Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
alexandergrando
Contributor III
Contributor III

IF(getcurrentfield Not Working

Hi,

I am trying to use the following expression:

If(getcurrentfield(MyGroup)='Properties', 'Hi', 'Bye')

For some reason, the expression only returns 'Bye' even when the current field selected is Properties. Attached is a sample app. Your help would be greatly appreciated. Thanks.

1 Solution

Accepted Solutions
sunny_talwar

You are using the wrong function here.... try like this

If(GetFieldSelections(MyGroup)='Properties', 'Hi', 'Bye')

But if you will only ever make a single selection in your MyGroup field, you can also do

If(MyGroup = 'Properties', 'Hi', 'Bye')

View solution in original post

2 Replies
sunny_talwar

You are using the wrong function here.... try like this

If(GetFieldSelections(MyGroup)='Properties', 'Hi', 'Bye')

But if you will only ever make a single selection in your MyGroup field, you can also do

If(MyGroup = 'Properties', 'Hi', 'Bye')

balabhaskarqlik

GetCurrentField(groupname)

returns the name of the field currently active in the group named groupname.

So better to use GetFieldSelections like: =if(GetFieldSelections(val)=40,'Hi','Bye')

or simple if condition like: =if(val=40,'Hi','Bye')