Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

IMPORTANT: Upcoming LEF Database Maintenance, Oct. 3rd - SEE DETAILS
Showing results for 
Search instead for 
Did you mean: 
Creator II
Creator II

Field Names in variable

Hi friends

i need all the filtered list box values in textbox.

eg: I have an expression like.


Count ({$<[assets] = {'Assest1','Assest2','Assest3','Assest4'}, 

[group] = {'$(Valcoholoc1)'} >} DISTINCT TOTAL [Value] ))

here = Assest1, Assest2, Assests3 are the field names which are hard coded. in place of hardcode i want to replace it with variable...

assets is a column name in listbox. for example employee is a listbox, if i select A in another field the employee names will get filter in employee listbox(Table). So filtered field names should be placed in variable so that i can replace in the above expression,

I can use like =GetFieldSelections([assets],', ',2

But this wrks when we select multiple fields. i need the field names which are just filtered in listbox.

4 Replies
Not applicable


in your variable use something like

Concat(Distinct Chr(39) & [assets] & Chr(39), ',')

this will give you a concatenated list of possible values in your assets field like

'Value1','Value2','Value3' etc

hope that helps


Creator II
Creator II

Thank u. .It works.

Creator II
Creator II

can i place an exclude in this...

in my 1st value it shold exclude the dim value and calculate irrespective of that.

like my straight table displays assets dimension and its value.

dim             exp(value)

assets1     if(assets='asset1',Count ({$<[assets] = {'Assest2','Assest3'} >} DISTINCT  [Value] ))

assets2    if(assets='asset2',Count ({$<[assets] = {'Assest1','Assest3'} >} DISTINCT  [Value] ))

assets3    if(assets='asset3',Count ({$<[assets] = {'Assest1','Assest2',} >} DISTINCT  [Value] ))\

this is the sample example....

Not applicable

Not sure I follow what you are trying to do, can you post up an example application