Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
vlad_komarov
Partner
Partner

GetFieldSelections() function's return after wild card search was used

Hello,

In my application I am using a string that is generated by GetFieldSelections() function.

It works fine if I am selecting items in the list box directly.

I've noticed that if I am using the wild card search and pressing Enter, than all desired items are displayed selected, but the GetFieldSelections() function returns just an entered search string:

QV_wild_card_getfield_selection.jpg

QV_wild_card_getfield_selection_2.jpg

Clicking on any of selected items, or adding new item to selected list resets the GetFieldSelections() string to desired value:

QV_wild_card_getfield_selection3.jpg

Any suggestions how to achieve it with just using the wildcard search option?

Best regards,

Vladimir

4 Replies
JonnyPoole
Employee
Employee

i would suggest using concat (distinct  <fieldname>)   to bring back a pipe delimitted list of unique selected values;

ex:  = concat( DISTINCT Year, '|')

vlad_komarov
Partner
Partner
Author

Jonathan,

Thanks for suggestion.

Yes, it works, but I am keeping this option as a last resort due to performance issues with using concat().

Plus I have to separately handle the case when no items are selected, which is adding more burden on app's performance.

Vladimir

JonnyPoole
Employee
Employee

Ok thanks.  Just  in case you were not aware if none are selected you can capture that situation with this expression:

if (   getselectedcount( Values) = 0 , ....

to invoke the calculation conditionally.  getpossiblecount( Values)  can also be handy in these situations to figure out the count when other fields have selections and some Values are in white and others in grey.

vlad_komarov
Partner
Partner
Author

Yes, it's pretty much how I am doing that.

VK