Announcements
Product Release Webinar: Qlik Insider airing December 6! REGISTER TODAY!
cancel
Showing results for
Did you mean:
Creator

## Search for whole Word in GetFieldSelections

Hi guys,

I have the following problem:

I have a listbox (DIM) with about 30 values, for example 'WPOO', 'HWGR', 'UWGR', 'WG'.

I want to display a dimension in a chart only if the value in the listbox is selected.

So for the dimension "HWGR" i have tried it with

=substringcount(Chr(39) & GetFieldSelections(DIM,Chr(39)&','&Chr(39),30) & Chr(39),'HWGR')=1

That works, my problem is, if i do this for "WG" with

=substringcount(Chr(39) & GetFieldSelections(DIM,Chr(39)&','&Chr(39),30) & Chr(39),'WG')=1

the dimension "WG" is shown, even if only "HWGR" is selected.

Is there a chance to do this, for example with match or wildmatch?

Regards

Chris

Labels (1)
• ### Application Development

1 Solution

Accepted Solutions
Creator
Author

Hi Marcus,

Yes i thought about this solution also, but now i got it worked myself with this formula:

substringcount(chr(33)&GetFieldSelections(DIM,Chr(33)&','&chr(33),50)&chr(33),'!WG')=1

2 Replies
MVP & Luminary

You may simplify your approach by using a numeric comparison. Means each dim-value get a number, for example with a dual(string, number) or as an extra field created with recno(), rowno(), autonumber() or further methods. And then the comparison may look like: max(Dim) = 5

- Marcus

Creator
Author

Hi Marcus,