Skip to main content
Participating Frequently
June 26, 2020
Beantwortet

Javascript if else

  • June 26, 2020
  • 1 Antwort
  • 468 Ansichten

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

Dieses Thema wurde für Antworten geschlossen.
Beste Antwort von 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 Antwort

try67
Community Expert
try67Community ExpertAntwort
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.