Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can a Simple Scripted Validator be used to validate three custom fields?

Lesley_Groh March 29, 2020

Hi,

I would like to use the ScriptRunner Simple Scripted Validator to validate that ONE of three custom fields are set to 'Yes' before the transition can proceed.  They are all Radio Button fields.  Just to be clear, only ONE of the custom fields needs to be valid for the transition to proceed.  Is this possible?  I was trying to use || to accomplish this, but it seems all fields must be answered with 'Yes' using ||.

For example. . .

cfValues["Select 'Yes' if you are certain that you want to CANCEL ALL open reviews related to this review."]?.value == 'Yes' || cfValues["Select 'Yes' if you are certain that you want to CANCEL ALL open reviews related to this Level 2 review."]?.value == 'Yes' || cfValues["Select 'Yes' if you are certain that you want to CANCEL ALL open reviews related to this Level 3 review."]?.value == 'Yes'

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Lesley_Groh March 29, 2020

I figured it out.  Yes, those II allow this to work.  Thanks!

Suggest an answer

Log in or Sign up to answer