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

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)