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: 
Not applicable

trigger on input field

I am having problem with trigger on input field. Here is what I am trying to do. I have a input field and a slider. If I change the content of the input field I expect the slider to reflect the same content. If I change the content of the slider I expect the input field reflect the same content as that of the slider. Currently when I change the content of the input field the slider doesnt reflect the change. I established a onchange trigger on the inputfield to call a macro that will set the content of the slider same as that of input field but the trigger never gets activated and the macro is never called. Is this a bug?

I managed to get the reverse to work (change slider would cause the content of input field to change)

4 Replies
pover
Partner - Master
Partner - Master

A trigger is not necessary. Assign the same variable to the slider as the input box and you will see that if you change one the other will change without having to create a trigger.

Regards.

Not applicable
Author

How do I assign content of input field to a variable? I know how to do that with a slider

pover
Partner - Master
Partner - Master

The same variable you are using the in the slider should be in the list of available variables in the General tab in the Input Box Properties. Just add that same variable to the list of Displayed variables.

Since the variable is per document if you change its value in one object its value will change automatically in whichever other objects that variable is used.

Regards.

Not applicable
Author

It seems to be a misunderstanding in this thread between input fields and input boxes. An input box can be connected to a variable, and an slider can be connected to the same variable, but the question here was about inut fields which is not the same as input boxes.

An input field, created in the load script, can as I understand exist on several rows in a table box, so therefore it can not be used by a slider, (since how would the slider know which of all the possible input fields to change?)

But by creating a new variable which and connect that to the slider, and a  then create a "variable trigger" connected to a macro that updates a specific input field, it should in this way be possible to make a solution that works.