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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trigger: Getmyfieldselections. Multiple selections.

Hi guys,

Ive created a trigger that gets field selections from Calendar A, which then should select the same range in Calendar B.

It works fine as long as I select only one value. But on multiple it does not work. This is how my trigger looks like:

Field CalendarBMonth

On select: =GetFieldSelections(CalendarAMonth)

Field CalendarBMonth

On Change: =GetFieldSelections(CalendarAMonth)

i.e. when I select/deselect the month January, it works fine. Now when I select January AND Febuary it doesnt do anything. Any tips?

Thank you

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

Field CalendarBMonth

On select: ='(' & GetFieldSelections(CalendarAMonth, '|') & ')'

Field CalendarBMonth

On Change: ='(' & GetFieldSelections(CalendarAMonth, '|') & ')'

View solution in original post

3 Replies
sunny_talwar
MVP
MVP

Try this:

Field CalendarBMonth

On select: ='(' & GetFieldSelections(CalendarAMonth, '|') & ')'

Field CalendarBMonth

On Change: ='(' & GetFieldSelections(CalendarAMonth, '|') & ')'

Not applicable
Author

Awesome, thanks alot! Could you explain the operation of the expression so that I can come up with these kind of solutions myself next time I encounter such a thing?

sunny_talwar
MVP
MVP

From QlikView Help:

Capture.PNG

So in order to get this format (A|B), I added '(' and ')'. and GetFieldSelections by default give values like this -> A, B, but to get A|B I specified the separator to be | -> GetFieldSelections(FieldName, '|')

I hope this helps.

Best,

Sunny