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.
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
- Open your already existing application or start a new one.
- Add the entity containing the two Choice Set fields. The entity fields and data should look similar to the example below.
- Add a table and bind the entity to the Data Source property of the table.
- 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.
- 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.
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.
Updated 2 months ago