Subscribe

UiPath Activities

The UiPath Activities Guide

Executing Do Block On Checkbox Change

Overview


You can configure activities inside the Do block to execute when a specific checkbox in the form is checked or unchecked.

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 Checkbox component.
  5. In the Data tab, click Calculated Value. This expands a list of fields.
  6. In the JavaScript field, enter the following JavaScript code:
const updateOnChange = instance.updateOnChange;
    instance.updateOnChange = function(flags, changed) {
          if (flags.modified) {
           instance.emit('execute', instance.component.key , {});
          }
    return updateOnChange.call(instance, flags, changed);
}

The code snippet above triggers the execution of the activities from the Do block based on the checkbox change.

  1. Save the form.
  2. At runtime, when you make changes to the checkbox, notice the activities in the Do block being executed.

Sample Workflow


To check the complete workflow or to have a future reference, download the XAML example below.

Updated about a month ago


Executing Do Block On Checkbox Change


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.