The CreatorCon Call for Content is officially open! Get started here.

Catalog UI Script for multiple IF not working

Nisha30
Kilo Sage

Hi Guys,

 

The below script works only for first time when I select the value from the drop down but when I select another choice it no more works.

 

Condition = I gave 'Variable name'  is Anything

 

Nisha30_0-1726763349161.png

 

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

Since you're using a script anyway, it would be better to do this in a Catalog Client Script so that you have more control over the if and else.  You would just start it off if (g_form.getValue('machine_size') != '') { then do all that, else do whatever else.  Check you test case also, or fix your indentation - it's hard to tell in the small screenshot with a section commented if the 'else' block is in the right place.