Uipath forms JS condition on select box

I am trying to write a js to check on a condition if selectbox had value Single or Multiple a textbox Amount should appear or else the Amount text box will be hidden.

result = (data.selectbox == ‘single’ || data.selectbox == ‘multiple’);

but this does not work.

@Mani_Kandan,

Try this way:

result = (data.selectbox === ‘single’ || data.selectbox === ‘multiple’);

=== checks both value and type equality

Tried above suggestion but still facing the same issue

Why don’t you just use the built-in conditional features? Set the Amount box to hidden by default, then add a conditional for the Amount box…

You can also do it with the Logic tab and configure logic for both show and hide:




End result: