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: 
Frédéricdh
Creator II
Creator II

GetFieldSelections

I want to test the result of GetFieldSelections, with this function:

= If (GetFieldSelections(LAND) = '-',1,0)

 

but when GetFieldSelections gives '-', the test gives 0 back, why?

 

thanks for helping

Labels (1)
1 Solution

Accepted Solutions
TheoAtragie
Partner - Specialist
Partner - Specialist

Try this

=if(isnull(GetFieldSelections(LAND)),1,0)



Enjoy your Qlik.

Kind regards,
Théo ATRAGIE.

View solution in original post

3 Replies
TheoAtragie
Partner - Specialist
Partner - Specialist

Try this

=if(isnull(GetFieldSelections(LAND)),1,0)



Enjoy your Qlik.

Kind regards,
Théo ATRAGIE.

Clement15
Partner - Specialist
Partner - Specialist

Hello, you can use this :
if(len(GetFieldSelections(LAND))>=1 ,0,1)

rwunderlich
MVP
MVP

"-" is the display value for Null() and as others have responded, you need to check for a null value, 

I find a slightly clearer method to to test if selections are made in a field to be:

GetSelectionCount(LAND)

-Rob