Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

If statement in inout box custom constraint

I am trying to write an if statement in my custom constraint in an input box. Currently I have the following which works fine :

=$ >vPLR

But I need to write something like the following:

=If(vUser=2,vPLR,$ >vPLR)

I realize the above is not the correct syntax but looking for help if it is possible to write an if statement in a constraint and how it would look.

Thanks,

Steve

1 Solution

Accepted Solutions
Nicole-Smith

Maybe it would work if you had another variable (e.g. vConstraint) that does the "=If(vUser=2,vPLR,$ >vPLR)" calculation and then just use the variable in the constraint setting?  This way you're not actually doing the if calculation in the constraint setting but passing in the actual values that have already been calculated in the variable.

View solution in original post

2 Replies
Nicole-Smith

Maybe it would work if you had another variable (e.g. vConstraint) that does the "=If(vUser=2,vPLR,$ >vPLR)" calculation and then just use the variable in the constraint setting?  This way you're not actually doing the if calculation in the constraint setting but passing in the actual values that have already been calculated in the variable.

zagzebski
Creator
Creator
Author

Thanks Nicole. Makes perfect sense.