In a simple script validator, I have the following code:
(cfValues['Implementation Status']?.value == 'Rolled Back' && transientVars["comment"]) || !cfValues['Implementation Status']?.value == 'Rolled Back'
Expected Results: Require a comment when Implementation Status = Rolled Back; otherwise don't require a comment. Implementation Status is a Radio Button field
Actual Results: A comment is always being required regardless of the value of Implementation Status.
Of course as soon as I post this, I realize I'm missing parenthesis:
(cfValues['Implementation Status']?.value == 'Rolled Back' && transientVars["comment"]) || !(cfValues['Implementation Status']?.value == 'Rolled Back')
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.