Skip to main content
Tayran
Participant
Jul 12, 2017 9:17 PM UTC
Question

Is there a quicker way to add validation script to multiple dropdown lists?

if (event.value=="VD") 

    event.target.fillColor = color.gray; 

else if (event.value=="OD") 

    event.target.fillColor = color.ltGray;  

else event.target.fillColor = color.transparent; 

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

try67
Community Expert
Community Expert
Jul 12, 2017 9:21 PM UTC

Put the code in a doc-level function and then use a script to set the Validation action of the fields to call that function.

Translate
Tayran
TayranAuthor
Participant
Jul 12, 2017 11:06 PM UTC

Thanks!  I guess I need more than that. How do I "Put the code in a doc-level function and then use a script to set the Validation action of the fields to call that function."

Translate
try67
Community Expert
Community Expert
Jul 13, 2017 8:57 AM UTC

Do you want to apply this code to all drop-downs in your file, or just some?

Translate