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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional replace

Hi! Using QV 9 and trying to get a button (action=set variable) to replace a string with a new value through a input field.
But now I want it conditional with

=if(vStop=0,'=replace(vVar,"","")',vString)

It works but now the formula evaluates everytime I make a change in the input field. No need to press the button...(?)
1 Solution

Accepted Solutions
Not applicable
Author

So close... Just remove the equal sign before replace and the surrounding quotes (and possible change double quotes to single quotes).

=if(vStop=0,replace(vVar,'',''),vString)

View solution in original post

1 Reply
Not applicable
Author

So close... Just remove the equal sign before replace and the surrounding quotes (and possible change double quotes to single quotes).

=if(vStop=0,replace(vVar,'',''),vString)