Uipath form dropdown

Hi All,
I created form task in long running process, which contains a dropdown list, based on the dropdown value, I need to enable some of the fields inside the same form, How to enhance the field logic for dropdown list ? how I can use selected value while write the logic in form ?

I referred this link for write logics, any sample workflow or demo code for solve this ?
thanks in advance

@lakshman @Anthony_Humphries @ovi

JavaScript will work on Dropdown select option.

Event will be “Onchange” in dropdown.

Onchange event will trigger JavaScript code and get the selected value and same event we can disable and enable other fields in form.

Thank You!

1 Like

Check this UiPath forms | Dependent Dropdown | Execute Do block on Dropdown Change |Tutorial - YouTube though its paid it will help you

1 Like

Hi @Vajrang,

I have followed same steps mentioned in the video, but I can see after selecting value from the dropdown with JavaScript code, the do block is getting executed 4 times.
How to avoid multiple execution of do block.

Priyanka G

I am having this same issue where the do block executes multiple times, is this a bug?

make sure you dont have submit on change enabled in dropdowns

Hi @Vajrang,

Can you please let me know where can I disable the submit on change option in dropdowns.

Or are you referring to the script written for the dropdown as below -

const updateOnChange = instance.updateOnChange;
instance.updateOnChange = function(flags, changed) {
if (flags.modified) {
return updateOnChange.call(instance, flags, changed);

If anything needs to be changed in the script let me know. It will help me very much.
Thanks in advance.

yes the code that you mentioned is correct