Skip to main content
Participating Frequently
June 26, 2020
Answered

Javascript if else

  • June 26, 2020
  • 1 reply
  • 464 views

Hi,

 

I just want to create a small if else condition in js but obviously I´m not able..

If the text in "Dropdown1)="Text_test" then app.alert("Mytext", 3); else = do nothing

 

That can´t be that difficult? but I´m just not able..

 

Thanks in advance

Leo

This topic has been closed for replies.
Correct answer try67

As the custom validation script of "Dropdown1" enter the following code:

if (event.value=="Text_test") app.alert("Mytext",3);

Make sure to tick the option to commit the selected value immediately (under the field's Properties, Options tab), or it will only execute when you exit the field, not when you make the selection.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
June 26, 2020

As the custom validation script of "Dropdown1" enter the following code:

if (event.value=="Text_test") app.alert("Mytext",3);

Make sure to tick the option to commit the selected value immediately (under the field's Properties, Options tab), or it will only execute when you exit the field, not when you make the selection.