Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
olivierrobin
Valued Contributor 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 ?

4 Replies
henrikalmen
Contributor

Re: searching multiple values in the ui

Could match() be a relevant function for your case?
olivierrobin
Valued Contributor III

Re: searching multiple values in the ui

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
Contributor

Re: searching multiple values in the ui

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?
MVP & Luminary
MVP & Luminary

Re: searching multiple values in the ui

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