Is there a limitation on the size of expression builder strings? Run document Chain id?

I have two separate x?y:z nested conditional statements in the Run Document Chain Id field simulating a switch statement.

One of the statements is 251 characters long the other is 418 characters long. The 251 character statement works fine with 4 imbedded conditionals. The 418 character statement gives a error:

Caused by: [Error: unexpected token in contstructor] [Near : {... Complete'):'besPSSSandCheckLis ....}] 

The 418 character statement has 5 conditionals and much longer variable names hence the increased size.

I have gone over and over the longer of the two expressions looking for errors. I even used an editor (notepad++) which matches parenthesis, braces, quotes, etc to see if there is a typo. I can't find any typos or mismatched delimiters.

I'm getting suspicious of the number 251. 251 is very close to 256, a very magical number in computers. The first, working, statement is just under 256 characters long. The second is well over that.

The question is: Is there a character buffer limit on the buffer for the expression builder and/or Run Document chain id field in studio?

Here are the two statements:

This statement works.

@{Document["PSI1:Dents"]=='no'?( Document["PSI1:Flaking"]== 'no' ?( Document["PSI1:Dirt"] == 'no' ?(Document["PSI1:TransitionWires"] == 'no'?'ac_stub':'besPSI1FTDDgetComment'):'besPSI1FTDDgetComment'):'besPSI1FTDDgetComment'):'besPSI1FTDDgetComment'}

This statement generates the error above:

@{Document["PSSand:CleanedRubberAlcohol"]=='yes'?( Document["PSSand:SandUniformEndtoEnd"]== 'yes' ?( Document["PSSand:SixHundredGritSandPaper"] == 'yes' ?(Document["PSSand:SpongeDustOffRubber"] == 'yes'? Document["PSSand:WireSideDown"]=='yes'?'ac_stub':'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'):'besPSSSandCheckListToComplete'}
0 votes

1 answers

755 views

ANSWER



Your expression is malformed, the innermost parenthesis looks like:

( Document["PSSand:SpongeDustOffRubber"] == 'yes' 
    ? Document["PSSand:WireSideDown"] == 'yes'  ? 'ac_stub' : 'besPSSSandCheckListToComplete'
 )

It's missing a : something to match the ?. Or the parenthesis is misplaced.

And no, there are no size limitations like that in Nuxeo Studio.

0 votes