Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jagannalla
Partner - Specialist III
Partner - Specialist III

Holding Data instead of empty

Hi,

I've a 2 listboxes with 2 fields(Group,Group1). OnActiveSheet i written a macro to select all fields of data in listbox.

Code is:

Sub ActivateSH12

    set lb=  ActiveDocument.GetSheetObject("LB455")

    lb.SelectPossible

set lb=  ActiveDocument.GetSheetObject("LB456")

    lb.SelectPossible

End Sub   

- I taken a variables v1,v2 to store all selection of listboxes in button action as v1= GetFieldSelections(Group,',',50) & v2= GetFieldSelections(Group1,',',50).

- Upto here is fine and it is working to store all data into variables. But if i clear all listboxes and when i click the button the variables are holding all data of listboxes instead of empty.

4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Its working properly at my side.

   Can you please upload the qvw file.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jagannalla
Partner - Specialist III
Partner - Specialist III
Author

The problem is appearing  when we have expression in the listbox.

For Eg:

- I've 2 listbox with fields F1,F2.

- I'm taking the expression in F2 as =if(F1='A',F2) i.e F1 has data A.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Pls. upload the qvw file. That will help me to understand the problem properly.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
erichshiino
Partner - Master
Partner - Master

Hi, Jacq

I don't know if there is a limitation for those macros when you use expressions... can't you put that expression in your script and then use it as a regular field?

Regards,

Erich