Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to trim my 'GetCurrentSelections' results

Hello All,

Can anyone help me change the format of what is displayed when I use the GetCurrentSelections function?


I’m currently using this expression    ='Current Selections:  ' & GetCurrentSelections(' | ')

It works fine and returns something like      Current Selections:  Team_Name:Eagle | Region:Shefield


I’m trying to get      Current Selections: Eagle | Shefield    with the field name dropped at the ':'

Can I get it to trim the result by only taking what appears to the right of  the ‘:’  ???

I was thinking something along the lines of indexing the ‘:’ in a string function like this

Mid(GetCurrentSelections, (index(GetCurrentSelections, ':') -1))

I don’t think this works though as GetCurrentSelections is not a field……..

Any Ideas would be much appreciated!


Scott

3 Replies
awhitfield
Partner - Champion
Partner - Champion

Hi Scott,

you Could try something like  ='Current Selections :' &GetFieldSelections(Team_Name) & ' | ' &GetFieldSelections(Region) , you just need to specify the file the field names

Andy

Anonymous
Not applicable
Author

Not a clean approach, but maybe like this,

=purgechar(GetCurrentSelections('|'),'fldname1:fldname2:')  // include all field names (possibly limiting it to the fields used as selection filters) here

robert_mika
Master III
Master III

Try:

=TextBetween(GetCurrentSelections(' | '),':',' | ')& ' | '&Textbetween(Textbetween(GetCurrentSelections(' | '),' | ',''),':','')