Subscribe

UiPath Apps

The UiPath Apps Guide

Use Count with Choice Set Values

Introduction


You can build an app to count the values from a table field that is of type Choice Set.
In this example we will use the Count function to do the following:

  • Get the total count of Choice Set values.
  • Get the count of Choice Set fields from a selected row inside a table.

Prerequisites


To do this, you first need to prepare an entity with two Choice Set fields, as follows:

  • Choices - not allowing multiple selections
  • Multiple choices - allowing multiple selections

Procedure


  1. Open your already existing application or start a new one.
  2. Add the entity containing the two Choice Set fields. The entity fields and data should look similar to the example below.
12601260
  1. Add a table and bind the entity to the Data Source property of the table.
  2. Add two labels next to each other inside a container.
    4.1 Add the following in the Text property of the first label: The total number of values in the Choice Set:.
    4.2 Add the Choices field of the entity using a Count function on the second label as shown in the example below.
689689
  1. Add two labels next to each other inside a second container.
    5.1 Add the following in the Text property of the first label: The number of values on the selected row:.
    5.2 Add the Table.entity.SelectedValues field using a Count function on the second label as shown in the example below.
689689

Result


When previewing the app, the total number of values in the Choice Set is displayed as 3.
The number of values on the selected row changes depending on the selected row.

19101910

Updated 2 months ago

Use Count with Choice Set Values


Suggested Edits are limited on API Reference Pages

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