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
HadynM
Responsive Resident
Responsive Resident

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
HadynM
Responsive Resident
Responsive Resident

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,979)