apps
latest
false
UiPath logo, featuring letters U and I in white
LEGACY
Apps User Guide
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Aug 5, 2024

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.



  3. Add a table and bind the entity to the Data Source property of the table.
  4. 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.



  5. 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.



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.



  • Introduction
  • Prerequisites
  • Procedure
  • Result

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.