Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
djbloiss
Contributor III
Contributor III

When using a variable for expression, cannot pass string with comma

I am using a variable to save my expressions, so I can reuse them in multiple places and change them all easily.  So I have this one expression saved as a variable:

Sum({<$1, $2, $3>} [Actual Quantity])

that I then use in multiple places.  here is a place that I call it and it works fine passing multiple arguments:

$(e_Cases($(vSO_Closed_Only), InternalSlsFlag={0}, Node1={'Diner Sales'}))

then I just used it here:

$(e_Cases($(vSO_Closed_Only), [Originating cl for order]={'D','P','B'}))

and it doesn't work.  Odd.  So I do some testing.  If I remove 2 of the 3 filters from the second argument, it then works. So this will work:

$(e_Cases($(vSO_Closed_Only), [Originating cl for order]={'D'}))

or this:

$(e_Cases($(vSO_Closed_Only), [Originating cl for order]={'B'}))

How can I get it so all 3 can be passed?

2 Replies
marcus_sommer

Commas within variable-parameters are always a problem which could be partly solved with various workarounds like hinted from Sunny. In your case you don't need mandatory the commas because you could replace your value-list with a search-string like (D|P|B).

- Marcus