Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm trying to do a very simple task. I have a filter with user id and a text box with formula =GetFieldSelections(name)
I want the name to be displayed in the textbox but I'm not getting any result, its just blank.
Is this a bug? What should I do?
GetFieldSelections will only work on the field being selected (Green selection state). You can use the Concat function to find the matching UserName.
eg Concat(Distinct UserName, ' ')
This should work for you, given that your field names are the same:
'UserName: ' & If(GetSelectedCount(userid) > 0, CONCAT(DISTINCT username, ', '), 'none selected')
Not sure what you are expecting. Take a look at this ..
Once you make selections it will look like this ..
@Lisa_P - Thank you for your response. This is exactly what I'm looking for. PFA, I have selected some userid and I want username to be displayed. Formula in text box: 'UserName: '& GetFieldSelections(username)
Is there any step that I'm missing here? getfieldselections is not returning any result.
GetFieldSelections will only work on the field being selected (Green selection state). You can use the Concat function to find the matching UserName.
eg Concat(Distinct UserName, ' ')
@Lisa_P Sorry I did not understand. Where should I write this formula?
In the text object.
It may be simpler to show in a table. You could have a conditional function to only show the UserName column if there is selections in the userid field.
Qlik is case sensitive as well, so field names must match exactly in your expressions
Got it. Thank you. Sorry I'm new to Qlik, can you help me with the formula to for this - if there is selections in the userid field.
This should work for you, given that your field names are the same:
'UserName: ' & If(GetSelectedCount(userid) > 0, CONCAT(DISTINCT username, ', '), 'none selected')