You are viewing limited content. For full access, please sign in.

Question

Question

Forms: Count Radio Button Selection in a Collection

asked on November 22, 2018

Hi all,

I have a Form with a Collection, comprised of Radio Buttons (New / Existing values), with Field Rules to show / hide additional fields depending on the Radio Button selected.

 

I've been trying to work out how I can get a count of how many "New" Party types are added to the collection, so I added a Numeric counter field ("New Party Counter") to the collection, and added a calculation formula to this field so that if "New" is selected, the counter field will contain 1, else 0. I thought I could have another numeric field outside of the Collection where I could get a SUM and then in the Business Process utilise this accordingly.

 

 

 

The calculation formula works OK for the first item in the Collection (correct value added to the counter field), however for the subsequent items added to the collection, these counter fields  just seem to utilise the same counter value from the first item.

 

 

Not sure where I'm going wrong or how I can achieve this?

 

Any feedback will be appreciated!

 

Thanks in advance.

Tim

 

0 0

Answer

SELECTED ANSWER
replied on November 23, 2018

Change your formula to '=IF(INDEX(Party_and_Trust.Party_Type, Row())="New",1,0)'. This should isolate each of the rows calculation.

With tables and collections, values are stored like in an Excel or database with Columns and Rows. So we need to use INDEX() to specify which, in your case, Party_Type value we want to look at as there are 3 above. 

INDEX(column,row) is how the function is set up, so Party_and_Trust.Party_Type is the column we want and the ROW() function will specify the collection set number we are currently on. 

2 0

Replies

replied on November 23, 2018

Thank you so much Dean!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.