Skip to main content
Inspiring
June 1, 2023
Question

Dropdown selection triggers alert

  • June 1, 2023
  • 1 reply
  • 362 views

Having problems with a dropdown selection (specific election) triggering an alert (warning) message. No matter what selection is made on the dropdown, the alert popup displays. Can't figure out how to isolate the message to display based on a few select choices. Also tried unsuccessfully tweaking Nesa's 'CompHours' dropdown selection-alert message post example by adding ' else event.value==""; ' to try67's statement below. Guidance greatly appreciated. 

I have this as a custom validation script in the Dropdown field posted by Try67.

 

if (event.value=="Choice1"||"Choice2"||"Choice3") app.alert("Some message text.",1);

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 1, 2023

I hope I didn't post this code, as it's incorrect. This is not how you compare multiple values.

It should be:

if (event.value=="Choice1" || event.value=="Choice2" || event.value=="Choice3") app.alert("Some message text.",1);

 

Inspiring
June 1, 2023

Too funny!!! No I screwed up your original!!! Thanks try67!!!!