Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
LindsayCooper
Contributor II
Contributor II

Pass variable list from input box to field via button

Hi! I have an input box where a list of values can be entered, comma separated, and they are assigned to a variable. I have a button with an action to select values in a field based off that variable, and the values are =Aggr(Only({<equipment_type={$(vEquipType)}>} equipment_type), equipment_type). This is either doesn't work or selects only the first item in the list, even though the set analysis shows the whole list. Any ideas on how to get this to work? Many thanks.

Labels (1)
2 Replies
henrikalmen
Specialist
Specialist

I suggest you first try your expression with hard-coded value instead of the variable, to see that it works as expected.

My next thought is that I am guessing your variable has values in this style: A,B
But the set expression probably needs the values like this: 'A','B'

You could either teach the users to input in the correct format, or you need to process the input string in order for the set expression to work.

LindsayCooper
Contributor II
Contributor II
Author

Thanks a bunch for chiming in! The apostrophes didn't work, but I was able to get it to work using a replace function, replacing the commas with colons.