Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Conditional Hide a textfield with more listboxes and more values

Hello i have 3 Listboxes with a lot of values

Listbox 1 (name: #box1) contains "Material ID" etc....

Listbox 2 (name: #box2) contains "Spec ID" etc.....

Listbox 3 (name: #box3) contains "Sampleplan ID" etc....

Now i created a textfield with some informational text. I want this textfield been hidden when "Material ID", "Spec ID" and/or "Sampleplan" is selected in the listboxes.

Is this possible? and How?

Thanks

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: Conditional Hide a textfield with more listboxes and more values

Hi sneekyshadow

please see the attached example for help.

Maybe you have to modify the condition to get the result you expect.

Good luck!

Rainer

10 Replies
jonbrough
Valued Contributor

Re: Conditional Hide a textfield with more listboxes and more values

You can test for GetCurrentSelections(). Using something like this in your Show condition:

NOT wildmatch(GetCurrentSelections(),'*MaterialID*','*SpecID*','*SampleplanID*')

Jonathan

ariel_klien
Valued Contributor

Re: Conditional Hide a textfield with more listboxes and more values

Hi

you can use: GetFieldSelections() function.

use it in the Text Object Properties > layout > show > conditional.

write something like this:

GetFieldSelections(Name_of_Filed_ #box1) <>'Material ID' or

GetFieldSelections(Name_of_Filed_ #box2) <>'Spec ID' or

GetFieldSelections(Name_of_Filed_ #box3) <>'Sampleplan ID'

BR

Ariel

Not applicable

Re: Conditional Hide a textfield with more listboxes and more values

Ok now i have:

GetFieldSelections(#PRODUCTS)<>'Material ID' and

GetFieldSelections(#SPECS)<>'Spec ID' and

GetFieldSelections(#SAMPLEPLAN)<>'Sampleplan ID'

Works a litle bit. But when i select more fields from #PRODUCS (#Box1) it wont work annymore. Works when i only select 'Material ID'

if i change the "and" with a "or" it works on nothing.

Re: Conditional Hide a textfield with more listboxes and more values

Hi,

     Try this.

     If(Wildmatch(concat(#PRODUCTS,','),'Material ID') or

          Wildmatch(concat(#SPECS,','),'Spec ID') or

               Wildmatch(concat(#SAMPLEPLAN,','),'Sampleplan ID'),0,1)

Regards,

Kaushik Solanki

Not applicable

Re: Conditional Hide a textfield with more listboxes and more values

Again, if i select more then the Material ID from #PRODUCTS this is not working.

Re: Conditional Hide a textfield with more listboxes and more values

Hi,

     Ohh I am sorry i forgot to place the * in the expression.

  If(Wildmatch(concat(#PRODUCTS,','),'*Material ID*') or

          Wildmatch(concat(#SPECS,','),'*Spec ID*') or

               Wildmatch(concat(#SAMPLEPLAN,','),'*ampleplan ID*'),0,1)

Regards,

Kaushik Solanki

Not applicable

Re: Conditional Hide a textfield with more listboxes and more values

And now it is not showing when i have selected nothing

Re: Conditional Hide a textfield with more listboxes and more values

Hi,

Create 3 variables as below

vField1 = if(GetSelectedCount(Mese)>=1  ,0,1)

vField2 = if(GetSelectedCount(Litri1)>=1  ,0,1)

vField3 = if(GetSelectedCount(Cum)>=1  ,0,1)

Go to Object Properties > layout > show > conditional put condition (vField1 or vField2 or vField3)

Not applicable

Re: Conditional Hide a textfield with more listboxes and more values

Hi sneekyshadow

please see the attached example for help.

Maybe you have to modify the condition to get the result you expect.

Good luck!

Rainer

Community Browser