Forum Discussion

graham-onpoint's avatar
graham-onpoint
New Contributor II
6 years ago

Composite (JSON) Parameter?

Is it possible to evaluate a pipeline parameter that is itself a JSON document?

I am finding a number of use cases for this, especially when using sub-pipelines and you need the input parameters to be pre-defined. It would clutter up a complex sub-pipeline to have a dozen (or more) parameters when really only a few are needed.

A simple example would be to handle date stamps in file names, I have a Box sub-pipeline that is used to filter files by a part of their filename string. Unfortunately this isn’t standardized by our client and the datestamp can appear in a number of positions.

Instead of DATESTAMP_START and DATESTAMP_END parameters I’d like to just have define a single parameter called DATESTAMP containing this value:

{
  "start": 0,
  "end": 8
}

I have tried passing this string through to the Pipeline but get syntax errors trying to read the properties.

Is it possible for the parameter to be a composite JavaScript object and parsed by the expression engine?

2 Replies