Skip to main content

Is it not possible to use IF(or()) in a calculated field on a nintex form or am I doing something wrong?

If(or(VarVP-Pref​=="Doe, John", ManagerData=="No Manager Required"), "No Additional Reviewer Required", VarVP-Pref)

So if the variable equals John Doe, I want it to say "No Additional Reviewer Required". I want the same message to display if the previous approval box was also exempt, showing the text "No Manager Required".

The previous field is also a calculated field, is it because it won't allow me base a calculation off a calculation because of the order things get rendered?

thanks

try to rewrite your formula to:

If(VarVP-Pref=="Doe, John" || ManagerData=="No Manager Required", "No Additional Reviewer Required", VarVP-Pref)

try to put additional calculated value control on the form and set its formula to IF's condition to see how does it evaluate.


Thank you for the reply!

I had tried the different syntax, but no luck.

I went ahead and added another calculated value to evaluate that second IF on its own, and it's not working, so that may be the problem?

Eg. I tried :

If(ManagerData=="No Manager Required", "Yes", "No")

I can't seem to get it to evaluate to Yes (True). ManagerData is a calculated field that evaluates to No Manager Required in certain scenarios.


I even tried storing that calculation (for managerData) in a var to see if it would work better evaluating against that, still says "No".


do you have ManagerData visible on the form? does it really evaluates exactly to the string you compare to? aren't some leading/trailing spaces?

can you as well try calculated value control with formula: ManagerData=="No Manager Required"


I agree with Marian Hatala​ -

I would confirm what is being evaluated in that field and ensure it is what you are expecting.

I attempted to replicate the formula that you have and was successful getting it to fire, but I am using strings, not choice fields or anything like that. I am using two calculated fields though and it is evaluating as expected.

Check what the form is holding and evaluating.

Hope this helps!


Hello Dave Georgopoulis​ -

Were you able to get this working?


Sorry for the late reply. I ended up handling this in the workflow and not in the form itself, and this resolved my issues.

I have a SetFieldValue action nested in a RunIf that only runs if the reviewer is empty, switching it to "No Reviewer Required". And the Reviewer field can only be empty if certain validations rules in the form are met, so all in all it works the way I wanted to.


Reply