Expansion with SubField creating error in If Statement
My If statement feels like it should be pretty simple, but my second SubField expansion is breaking the expression, and I'm assuming this is because I'm using $(=) instead of $(), but I'm not sure how else to pull in the expansion.
//Any Selections for Right Axis
//More than Two Selections for Left
Essentially this code is for the expression portion of a list box. There are right and left list boxes. The list boxes changes based on user selections. They select a field they want to analyze and then they can choose a "Left" expression(s) and/or a "Right" expression(s). The ExprL table has expression names in one field and dollar sign expansions in another. These expansions correlate with expressions I already have stored as variables. So when the user selects "Sum of Premium" this would link to $(vSumPremium), which is what I would want to use as the expression.
This works fine except when only one value is selected for the ExprL.Favorites, this means only one value for ExprL.Expansion is available, so evaluating for SubField number 2 creates an error in my expression. It shows up as "-" in the list box, and when thrown into a text box returns "Error: Error in expression: ')' expected".
I solved this by choosing the '2' in the second SubField to '-1', but would there be a way to get this to work while still pulling the second SubField? Picture Below