Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic filter

Hi guys,

     can I create a dynamic filter with the following features:

  • I can select the field on which the condition is applied;
  • I can select the operator;
  • I can select the value;

Let me do a little example:

supposed to have these three field:

  • age - integer
  • degree - string
  • salary - real

Now I want select all people who are older than 35 (age > 35), after that I want do a new filter and I want select people who are master degree (degree = 'master degree').

I know that I can create an input field where I can insert the value, but I want change the field and the operator too.

5 Replies
Miguel_Angel_Baeyens

You can use variables and input boxes for each of the three field, operator, value, and based on that combination, trigger an action using another text object or a button, or even an OnChange trigger.


You can also use constraints in the input box to make sure the values input match the contents of a field or do not exceed a threshold, etc.

Anonymous
Not applicable
Author

I created two multi-selection field with predefined value for field and operator, and one input box where the user can insert the value.

When user select value inside multi-selection field, through trigger I update the value of v_fieldName and v_operator variables.

Then I created a button and when I press the button I want select the value inside the field.

The first problem is inside the Action -> Select on Field -> Field, I put =$(v_fieldName), but it doesn't work

Secondly how can I use the operator?

I think about something like this:

     only({<$(v_fieldName) >= $(v_value) >}$(v_fieldName))

but how can I change '>=' with the value inside v_operator?

Or maybe there is a best way?

Gysbert_Wassenaar

Like this: only({<$(v_fieldName) = {"$(v_operator) $(v_value) "}>} $(v_fieldName))


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I don't know why, but it doesn't work

Gysbert_Wassenaar

See attached example


talk is cheap, supply exceeds demand