web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Counting the number of...
Power Automate
Unanswered

Counting the number of values within a Form multiple answers box

(0) ShareShare
ReportReport
Posted on by

Hi,


I have a MS Form that has a multiple answers box like the one below:

 

flow-1.png

 

What I'd like to do is could the number of answers that is submitted and output the result as a numeric value I can use later within the flow.  I can see that within Flow the values are separated out and I thought I could use length to calculate but that doesn't appear to be working.

 

flow-2.png

 

Any thoughts gratefully received.

 

Cheers

Rob

Categories:
I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on at

    Hi @Rob_CTL 

     

    Getting information from Forms is tricky because everything comes in string format. I provide more details in how to take care of these issues in this article I wrote.

    https://manueltgomes.com/microsoft/forms/format-submitted-data/

     

    Can you please check if and let me know if you have any questions?

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers
    Manuel

  • Rob_CTL Profile Picture
    on at

    Hi @manuelstgomes 

     

    Thanks for the link.

     

    I can see that the output is formatted in both JSON and a string

     

    flow-3.png

     

    I am thinking there must be a way I can manipulate this data into something that I can count, or maybe I am wishing to much 🙂

     

    Cheers
    Rob

  • manuelstgomes Profile Picture
    6,625 on at

    Hi @Rob_CTL 

     

    Try the parse JSON action..

     

    But the issue is that everything is a string in Forms. It sucks I know but we need to deal with that 🙂

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers
    Manuel

  • Verified answer
    Rob_CTL Profile Picture
    on at

    @manuelstgomes I think I've got a solution, it's not pretty but it works.

     

    - I split the string using the comma as a delimiter

     

    flow-10.png

     

    - I then use this output and initialise a variable to create an array

     

    Flow-11.png

     

    - Finally I use a length expression to count the number of items in the array

     

    Flow-12.png

     

    The resulting output from this I can then fire into a SharePoint column

     

    Flow-13.png

     

    If anyone has a more elegant solution it be great to see it.

     

    Cheers
    Rob

     

  • manuelstgomes Profile Picture
    6,625 on at

    Hi @Rob_CTL 

     

    BINGO!!! You did it! That's it. Well done!

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

    Cheers
    Manuel

  • MPruszewicz Profile Picture
    4 on at

    Hello,

    You can alternatively put an expression:

    if(not(empty(yourFormObj),length(json(yourFormObj)),0)
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard