Count choice values in repeating section

  • 17 June 2019
  • 4 replies
  • 33 views

Badge +1

Hi all,

I want to be able to return a count of how many times a certian choice has been selected in a repeating section. There is a choice field which is a simple "Yes" or "No" option. I want to count how many times "Yes" has been selected and return that value.

 

E.g. there's 15 rows in a repeating section, and "Yes" has been selected on 10 of the rows. I want the value 10 to be calculated and displayed.

 

Thanks,

Mike.


4 replies

Userlevel 2
Badge +9

While not exact, you can use Vadim Tabakman's solution to parse through your repeating section.  See his post here:

http://www.vadimtabakman.com/nintex-formsworkflow-parsing-repeating-section-data.aspx

You can then just add in a run if statement that will add a number to each instance equals "Yes".  Download his user defined action and workflow.  At this point, I do not see a way to do this in the form itself.  It will most likely have to be performed via a workflow.

Badge +9

First of all use a Yes/No control in this case. Then create a calculated value control named e.g. cv  with formula

If(YesNo,1, '')
in repeating section where YesNo is the name of the Yes/No control.
Under repeating section create a calculated value control containing formula
count(cv)
Last step is hidding the calculated value control in repeating section by css or formatting rule.
2619iFF9535BFD2743DB3.png
 
 
Userlevel 5
Badge +14

I agree with @mlauer that yes/no controls would be more suitable in this scenario.

 

 

they even wouldn't needed any extra calculation - their true/false values are automatically treated as 1/0 in numeric formulas. so you could directly sum/count over them.

see 

 

Badge +1
Thanks for your response and solution! This works great for what I needed! :)

Reply