# Executing Do Block on Dropdown Option Change

> You can configure activities inside the **Do** block to execute when the dropdown option changes.

You can configure activities inside the **Do** block to execute when the dropdown option changes.

## Tutorial

To use this feature:

1. Add the **Create Form** activity to your workflow.
2. Inside the **Do** block, configure the desired activities.
3. Open the Form Designer from the **Create Form** activity.
4. Drag and drop a **Drop-down List** component.
5. In the **Data** tab &gt; **Data Source Values** section, add your dropdown options.
6. Scroll down to the **Custom Default Value** section and expand it.
7. In the **JavaScript** subsection, enter the following JavaScript code:
   ```
   const updateOnChange = instance.updateOnChange;
   instance.updateOnChange = function(flags, changed) {
       if (flags.modified) {
           instance.emit('dropdownChanged', 'drop');
       }
       return updateOnChange.call(instance, flag, changed);
   }
   ```

    The code snippet above triggers the execution of the activities from the **Do** block when the dropdown option changes.
8. Save the form.
9. At runtime, when you change the dropdown option, notice the activities in the **Do** block being executed.

  <iframe
    src="https://documentationpicturerepo.blob.core.windows.net/screenshots/screenshots/Activities/FORMS_do_block_on_dropdown_change.mp4"
    title="Accelerate building automations with UiPath Integration Service"
    style={{
      position: "absolute",
      top: 0,
      left: 0,
      width: "100%",
      height: "100%",
      border: 0,
    }}
    loading="lazy"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerPolicy="strict-origin-when-cross-origin"
    allowFullScreen
  ></iframe>

## Sample workflow

To check the complete workflow or to have a future reference, download the [XAML example](https://documentationexamplerepo.blob.core.windows.net/examples/Activities/TestDropdownChange.xaml)
