cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Highlighted
HadynM
Level 8

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
Highlighted
HadynM
Level 8

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,125)