apps
latest
false
- Getting Started
- Demo apps
- How To
- Notifications
- Using VB Expressions
- Designing your App
- Designing your App with Autopilot
- Events and Rules
- Rule: If-Then-Else
- Rule: Open a Page
- Rule: Open URL
- Rule: Close Pop-Over/Bottom Sheet
- Rule: Show Message
- Rule: Show/Hide Spinner
- Rule: Set Value
- Rule: Start Process
- Rule: Reset Values
- Rule: Upload File to Storage Bucket
- Rule: Download File From Storage Bucket
- Rule: Create Entity Record
- Rule: Update Entity Record
- Rule: Delete Entity Record
- Rule: Add to Queue
- Rule: Trigger workflow
- Rule: Submit Action
- Leveraging RPA in your App
- Leveraging Entities in Your App
- Leveraging Queues in Your App
- Leveraging Media in your app
- Leveraging Actions in your app
- Leveraging Connections in your apps
- Web apps in Studio Web
- Application Lifecycle Management (ALM)
- UiPath® First-Party Apps
- Basic Troubleshooting Guide
Use Count with Choice Set values
Apps User Guide
Last updated Jan 21, 2025
Use Count with Choice Set values
You can build an app to count the values from a Table field that is of the type Choice Set.
In this example, we will use the Count function to get the total count of Choice Set values and display all possible choices in a Table.
To do this, you first need to prepare an entity with a Choice Set field.
- Open an existing application or create a new one.
- Add the entity containing the Choice Set field to your app:
- Select Add any, then Entity.
- Select your active tenant, then the entity containing the Choice Set field.
- Select Add.
- Add two variables to your app, and bind them to your entity and choice set:
- Select Add any, then Variable.
- Give the variable a name. Under Type, open the dropdown menu, and specify the variable type as the name of the entity you added in step 2.
- Add another variable to your app by repeating step 3a, but specify its type as
ListSource
ofChoiceSet
.
- Add a Table and Label to your app:
- Select Add control.
- Select Display.
- Drag the Table to an area in your app.
- Add a Label to your app by repeating steps 4a and 4b.
- Configure the Table:
- In the Properties panel, under Columns, select the Delete Column button. Repeat this once to leave only one column in the Table.
- Select the Column heading field to open its properties.
- Under Name, select Column heading. The Expression editor opens.
- Replace "Column heading" with "DisplayName", then select Save.
- In the Source field, select Open resources, then Expression editor.
- Add "DisplayName", then select Save.
- Bind the Table and Label to your entity and Choice Set:
- Select the Table.
- In the Properties panel, select the Additional resources button adjacent to the Data source field.
- Select the Expression editor, then add the following:
GetChoiceSet("choice_set")
, wherechoice_set
is the name of the choice set you want to use. - Select the Label.
- In the Properties panel, select the Text field.
- Replace "Label" with the following:
MainPage.Table.DataSource.data.Count.ToString()