Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

10 Replies
Anonymous
Not applicable
Author

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

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

Jonathan

ariel_klien
Specialist
Specialist

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
Author

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.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

And now it is not showing when i have selected nothing

Kushal_Chawda

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
Author

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