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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kge01
Contributor II
Contributor II

Create a button to set fields to selected values of other fields

Hey!

I need to create a button that sets multiple fields to the selected values of multiple other filters.

I created a test qvf as an example (see file attached):

What this button should do is:

  • Set “name” to the selected values of “ref_name”
  • Set “number” to the selected values of “ref_number”
  • Set “date” to the selected values of “ref_date”

I figured out to create 3 buttons which work to my satisfaction (see buttons: “set name to ref_name”, “set number to ref_number”, “set date to ref_date”).

However, I need to create one single button that performs all the 3 actions above, so you don't need to click on 3 different buttons. I tried to do this, but it doesn’t work (see button “set name to ref_name + set number to ref_number + set date to ref_date”).

Screenshot_example_buttons.PNG

Any ideas how to solve this?

Thank you very much for your help!

Labels (1)
10 Replies
jbhappysocks
Creator II
Creator II

Sorry, I don't think you can do this without first removing the " from you "Hello"

To change the string to remove the double "" you move the replce() outside of the expression, like:

 

=replace(

'('&'"'& GetFieldSelections(ref_name,'"|"', GetSelectedCount(ref_name, True())) &'"'&')'

,'""', '"' )

jbhappysocks_0-1675069034056.png

 

But if you do this the selection will not be correct as Qlik will try to Select Hello, not "Hello".

 

I doubt you can get around this, but if anyone has an idea I would also love to see it.