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

Set value of expression to a variable, not the expression itself?

I am trying to use an action of a button (due to not knowing or really understanding VB, and the fact that macros do not work in webview)  to set getfeildselections() to a variable. I want the VALUE of the current selection saved, and not the formula for getfieldselections()

I have the button click action as set variable intercompany to getcurrentselection(custid)

When I click the button then check the variable screen, the variable intercompany says:getcurrentselection(custid)

Since the variable is set to the expression getcurrentselection(custid) and not the value of getcurrentselection(custid) it is changing the variable based on the selection instead of leaving it set to the selection on button click.

How can I get this to set the value of the expression, and not the expression itself?

11 Replies
Not applicable
Author

OK New issue.

This works perfectly in the desktop, but if this is running in Webview, then nothing is working with the button, no color change, and no selections.

timoheideman
Contributor
Contributor

This was what i was searching for, but i needed to store text values into the variable. I managed to do that by using this expression in the value field of the set variable function on a button =chr(39) & GetFieldSelections([MyField]) & chr(39)