Count the list of choice

659
1
Jump to solution
03-24-2022 02:26 PM
Heena1
by
New Contributor III

Hello, I am trying to calculate the number of choice list from choices tab and display as text in survey form as hidden. Here is a scenario: there are 28 business list in choices, but inspectors will inspect certain number of business only. In the Summary Report, we want to include the total number of businesses and total number of businesses inspected.

I tried using "count(${business})" in calculation column, but no luck.

Any help will be appreciated!

0 Kudos
1 Solution

Accepted Solutions
Jim-Moore
Esri Regular Contributor

Hi @Heena1 

You can use the count-selected() function to count the number of choices selected by the user. For example, count-selected(${business}). For more info, see the Formulas documentation.

There isn't a function for counting the total number of choices in a choice list. If the total number of choices is unlikely to change frequently, you could just hard-code this number into the summary report template.

Hope this helps! Best, Jim

View solution in original post

1 Reply
Jim-Moore
Esri Regular Contributor

Hi @Heena1 

You can use the count-selected() function to count the number of choices selected by the user. For example, count-selected(${business}). For more info, see the Formulas documentation.

There isn't a function for counting the total number of choices in a choice list. If the total number of choices is unlikely to change frequently, you could just hard-code this number into the summary report template.

Hope this helps! Best, Jim