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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
pravinboniface
Creator III
Creator III

Button Chart object action to select values matching search criteria

I have a table with a lot of values for column id.  I need to provide a way for a user to filter the dashboard for hundreds of ids (by copy pasting from Excel). 

To do that I have a variable input text box where the user can paste ids using Qlik search criteria format, for eg.  '0001 OR 0002 OR 0003'.   The variable input text box will store these values in a variable.  Then the button chart is setup to filter the field Id with the pasted values that exist in variable Id using the action to select values matching search criteria.

For some reason, it does not work and I can't figure out what is going wrong.  

If I use '0001 OR 0002 OR 0003' in the Selections tool, it works perfectly, so I don't think anything is wrong with the search string.

In the button for the variable, I have tried vList, 'vList', $(vList) and all other combinations but nothing seems to work.

pravinboniface_0-1760581564024.png

Thanks for any guidance you can provide

Labels (3)
1 Solution

Accepted Solutions
robert_mika
Master III
Master III

OR does not work in Qlik with search you may need to store each of the value in a variable(probably giving users more input boxes or do some cleaning after input)  and  use 

'Select values matching search criteria'

 

similar to

'("' & $(vCustomer1) & '|' & $(vCustomer2) & '")'

View solution in original post

3 Replies
robert_mika
Master III
Master III

OR does not work in Qlik with search you may need to store each of the value in a variable(probably giving users more input boxes or do some cleaning after input)  and  use 

'Select values matching search criteria'

 

similar to

'("' & $(vCustomer1) & '|' & $(vCustomer2) & '")'

Amit_Prajapati
Creator II
Creator II

Hi @pravinboniface , 

Below is configured to select values based on a dynamic search criteria.

  • A blank variable vData is initialized to hold the selected values.

  • The variable vSearch is constructed using the expression:

    vSearch = chr(39) & chr(40) & left(Replace(vData, ',', '|'), len(Replace(vData, ',', '|')) - 1) & chr(41) & chr(39)

    This formats the selected values into a search string like '(|value1|value2|...)'.

  • The Button action is set to "Select value matching search criteria", and the value field uses the vSearch variable to apply the selection.

pravinboniface
Creator III
Creator III
Author

Thank you so much @robert_mika It input the values as (0001 | 0002 | 0003) and it worked!