Help counting how many times the same data is entered in a field

I’ve created a popup box with a multiline text input field and radio button block with 6 choices. When the user clicks the “Save” in the popup, a new thing is created, with a field to store the multiline text input and another field to store the radio button selection made. The user will make new inputs via the popup window many times.

My problem is, I want to tally up the number of selections for each of the radio buttons for each user. For example, I’d like to say the current user has selected radio button A twelve times, and radio button B three times. And another user has selected radio button A four times, etc. Then I can present this information on the page. How do I go about this? Thanks for your help in advance!

First, I would use dynamic data from a table (let’s say “Choice”) for each inputs of your radio buttons

For counting, I would create a table “Count” with

  • User
  • Choice
  • Count and increment it each time the user selects it one more time

Note : For getting every fast, add every new Count to a User’s list of count.

Then for your user’s statistics, use Count:filtered (Choice = Choice A)'s Count for getting your result.

Hope it helps and I understood you well.

4 Likes

I agree with NicolasDap you want to do it when the data changes rather than try to do something on “submit”.

If the “submit” is important (so the user could cancel and you don’t want to count the choices) then you could store the choices as has been suggested on a temporary table (maybe on the user) and then update the main table with those values when they hit submit.

2 Likes

Thank you both. These comments help me think about my data structure in a more creative way. I also like the temporary table idea as the “submit” action is important in my particular case.

But I am still not sure I understand the proposed solution fully. When you say “Count and increment it each time the user selects it one more time” - I don’t believe you can drive workflow from a specific radio button (i.e. incrementing each time a specific button is chosen), so where should I be driving this incrementing action from if not the radio buttons or the submit button?

Thanks again.

I don’t believe you can drive workflow from a specific radio button (i.e. incrementing each time a specific button is chosen)

You can do it with “When xxxxxxxx’s Value has changed” workflow. So each time a checkbox is changed, you run the workflow, and use “Is Checked” (or Not Checked) to vary your data.

Thank you! That was the missing piece for me.