Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dropdown selection triggers alert

Contributor ,
Jun 01, 2023 Jun 01, 2023

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);

 

TOPICS
JavaScript
290
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2023 Jun 01, 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);

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 01, 2023 Jun 01, 2023
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines