We have a custom field "Field Issue" (a checkbox), and another custom field "Cause Analysis" (multi line text).
Now I want to make sure that when a fiel issue is resolved, a cause analysis must be documented.
So I created a validator for the resolve issue workflow step:
cfValues['Field Issue']?.getValue() == null || cfValues['Cause Analysis']
System Behaviour:
Any help is highly appreciated!
Thank you for the suggstion, Eason. Unfortunately, it didn't work. The problem seems to be the || combination of the two checks. Because if I separate them in two different validators (one for Field Issue and the other for Cause Analysis), the system applies the expected logic, even with the short version cfValue['Cause Analysis'].
I just found the expression that solved my problem:
!cfValues['Field Issue'] || cfValues['Cause Analysis']
Helpful to find and verifying it was the admin->built-in scripts->condition tester, where it is far easier and quicker to test different "solutions" until you find the right one.
try replace
cfValues['Cause Analysis']
with
(cfValues['Cause Analysis']!= null && cfValues['Cause Analysis'].toString().trim().length()>0)
for checking None/Empty spaces inputs into the 'Cause Analysis' field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.