Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Current selections in text box

Hi all, i have my current selections displayed in a text box. A problem i have is that 5 fields are ticked to have 'one selected value', this causes the current selection text bix to be full as soon as the qvw is opened.

What i am looking for is a way to exclude the fields that have one selected value against them.

I know i can prefix them and use the hideprefix in the script, the prtoblem is i want them to appear in the proper current selection box, just not the one i have created in the text box.

The text box is for the users to see quickly the actual selections they have chosen, any preselected selections can be seen from the in built current selections.

the text box has the following expression..

=if(len(GetCurrentSelections())=0,'No Selections',

if(len(GetCurrentSelections())>165,'Too many selections to display','Current Selections :'& GetCurrentSelections(' | ','=')))

what i am wondering if there is an IF statement i can add in to say, if the current selections include any field starting in 'FX' then do not show.

I have attached a sample..

Any help would be appreciated.

Thanks in advance

1 Solution

Accepted Solutions
prieper
Master II
Master II

hmmm,

you may do a combination of REPLACE and GETCURRENTSELECTIONS:

aircode for textbox:

=REPLACE(GETCURRENTSELECTIONS(),

    'Dim1: ' & GETFIELDSELECTIONS(Dim1), '')

might have to be adjusted to your formatting, though.

HTH

Peter

View solution in original post

4 Replies
vamsee
Specialist
Specialist

HI Chris,

You can try GetFieldSelections(FieldName) and be more specific about the columns you want to consider

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/ChartFunctions/FieldFunc...

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, thanks for your reply.

Thats going to be difficult to do as i want all other fields to be considered, just not the ones starting in FX.

prieper
Master II
Master II

hmmm,

you may do a combination of REPLACE and GETCURRENTSELECTIONS:

aircode for textbox:

=REPLACE(GETCURRENTSELECTIONS(),

    'Dim1: ' & GETFIELDSELECTIONS(Dim1), '')

might have to be adjusted to your formatting, though.

HTH

Peter

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thats great, thanks Peter, I have managed to get what i want using multiple replaces.