Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To customize the output of GetFieldSelections()

hi,

I have a field named survey_id in my dashboard

If i select mutiple survey_id, and give in a textbox =GetFieldSelections(survey_id), i get the survey id's shown as comma seperated.

Example if i select survey ids 101,102,104,105 ..the text box will show "101,102,104,105"

I want to show it up as

-image "Survey ID 101.tif" -image "Survey ID 102.tif"-image "Survey ID 104.tif"-image "Survey ID 105.tif"

Can anyone tell me if this is possible using any string functions?

Thanks in advance

Sircute

1 Solution

Accepted Solutions
Not applicable
Author

Use the replace function

Replace(GetFieldSelections(survey_id),',','.tif Survey ID ')

this should almost give you what you need but it wont be exact you get the idea though

View solution in original post

8 Replies
Not applicable
Author

Use the replace function

Replace(GetFieldSelections(survey_id),',','.tif Survey ID ')

this should almost give you what you need but it wont be exact you get the idea though

giakoum
Partner - Master II
Partner - Master II

This could also help :

=Concat('Survey ID etc' & survey_id & 'tiff etc', '-')

Anonymous
Not applicable
Author

Ioannis,

There is a difference.  Concat() is using all possible values, while GetFieldSelections() only selected values.

Regards,

Michael

giakoum
Partner - Master II
Partner - Master II

True, but it still works if you select specific values.

See attached example, not perfect , but makes my point

Not applicable
Author

Michael is correct, I actually do not want any values when no selection has been made in survey_id field.

I want it only when some selections are made in that field.

I am just trying the option mentioned by Felim

Not applicable
Author

You would need to tweak it to ensure you only replace if survey id is selected, I have some example code here somewhere

giakoum
Partner - Master II
Partner - Master II

If(Len(getfieldselections(personid))>0,

Concat('Survey ID etc' & personid & 'tiff etc', '-'),'')

Not applicable
Author

Felim,

This could be achived using

=Replace(('survey id '&GetFieldSelections(SURVEY_ID)&' .tif'),',',' .tif-image, survey id ')

Thanks for the guidance

Loannis,

Yes the IF option also seems a good alternative. Thank You