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
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
Highlighted
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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (2,601)