Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
olivierrobin
Specialist III
Specialist III

searching multiple values in the ui

hello

my problem is to search multiple values  in the selected values of a field to activate conditional display

I can use instr() with getfieldselections() but it works with only one value. I have to find multiple values stored in a variable each value separated by a delimiter.

and another problem  is that these values can have spaces  and look similar.

e.g : the field may contain the values  'Mandatory' 'Not Mandatory'

 

any idea ?

Labels (4)
4 Replies
henrikalmen
Specialist
Specialist

Could match() be a relevant function for your case?
olivierrobin
Specialist III
Specialist III
Author

I don't think so ..

the values selected must have all the values of the variable.

for example , if ValueList=Value1,Value2 i have to check that those 2 values are contained in the selected values of the field

with match(), i will know that 0 or 1 of the values match, but not if all match

henrikalmen
Specialist
Specialist

I'm not sure I fully understand what it is you want to do. You have a variable with delimiter separated strings. You have a field with selections. How do these correspond and what is it that should be conditional? Perhaps you could give a practical example?
marcus_sommer

Maybe with something like this:

count({< Field *= {'$(var)'}>} distinct Field) = substringcount('$(var)', ',') + 1

with the requirement that '$(var)' contained a valid list of field-values including the needed quotes which might be created with: replace('$(varTemp)', ',', chr(39) & ',' & chr(39)).

- Marcus