cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Count - Radio Buttons that return a value - on the form/app - before submitting - just like InfoPath

Hi,

How do I go about counting 160 Radio buttons to see if they have a value in an app - real time or close to it - as it is filled out? - like before it is submitted/uploaded

Yes/No/NA

In InfoPath we can use count(), but powerapps does it differently?

 

Say I have an audit form with 16 sections 1.0 thru 16.0.

Radio Buttons rbtn1_1, rbtn1_2 ......... rbtn16_10

Radio Button can have a value of Yes/No/NA.

 

I wish to be able in real time, or button push show the user how many sections / radio buttons have been selected, less those that are not applicable (NA) and are "Yes" as a percentage of the total selected. That value is also stored on the form.

Count those that have a value.

Count how many are NA

Count how many are yes

Then create a percentage.

 

But have to start where?

A collection?

 

Where does one start?

1 ACCEPTED SOLUTION

Accepted Solutions
Responsive Resident
Responsive Resident

Re: Count - Radio Buttons that return a value - on the form/app - before submitting - just like InfoPath

Hi @Anonymous 

 

With only knowing what you have posted, start with a collection.

ClearCollect(
    colAuditQuestions,
    {
        Section: 1,
        Question: 1,
        QuestionText: "Question goes here",
        Answer: "NA"
    },
    {
        Section: 1,
        Question: 2,
        QuestionText: "Question goes here",
        Answer: "NA"
    },
    {
        Section: 1,
        Question: 3,
        QuestionText: "Question goes here",
        Answer: "NA"
    },
    ...,
    {
        Section: 1,
        Question: 10,
        QuestionText: "Question goes here",
        Answer: "NA"
    }
)

Then add a gallery to a page connected to this collection.
Add the appropriate controls to allow the users to answer the questions.
The radio control OnChange = Patch(colAuditQuestions,ThisItem,{Answer:Radio2.Selected.Value})
Then add some controls that show the stats you want for the summary as per below.
sample.JPG

Hope that helps get you started.

Cheers Hadyn

View solution in original post

1 REPLY 1
Responsive Resident
Responsive Resident

Re: Count - Radio Buttons that return a value - on the form/app - before submitting - just like InfoPath

Hi @Anonymous 

 

With only knowing what you have posted, start with a collection.

ClearCollect(
    colAuditQuestions,
    {
        Section: 1,
        Question: 1,
        QuestionText: "Question goes here",
        Answer: "NA"
    },
    {
        Section: 1,
        Question: 2,
        QuestionText: "Question goes here",
        Answer: "NA"
    },
    {
        Section: 1,
        Question: 3,
        QuestionText: "Question goes here",
        Answer: "NA"
    },
    ...,
    {
        Section: 1,
        Question: 10,
        QuestionText: "Question goes here",
        Answer: "NA"
    }
)

Then add a gallery to a page connected to this collection.
Add the appropriate controls to allow the users to answer the questions.
The radio control OnChange = Patch(colAuditQuestions,ThisItem,{Answer:Radio2.Selected.Value})
Then add some controls that show the stats you want for the summary as per below.
sample.JPG

Hope that helps get you started.

Cheers Hadyn

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,148)