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

Checkbox and output

Hej 

 

I am currently working on an app that should generate some price estimates. It is pretty simple, the user check a checkbox on the different components they need, and then press a bottom that gets them to the next page where they can see an estimated total price for the products that has been selected. Is it possible, and what formula should I use? 

 

I have put a screen shot of the test page. checkbox.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Checkbox and output

Hi @Anonymous,

 

I could think out the following sicenario:

For example, we have a SharePoint custom list, have two fields, one for Porduct name and other for the price.

Then under One Screen, we have build the check box for the Products, make sure each Products name could match the one under SharePoint list, 

then, add a button, sepcify the Onselect property with the formula below:

Navigate(Screen2,ScreenTransition.None)

Under the screen2, add a text box, sepcify the Text property with the following formula:

 

If(Checkbox1.Value=true,
 LookUp(Pricing,Title=Checkbox1.Text).Price)
+
If(Checkbox2.Value=true,
LookUp(Pricing,Title=Checkbox2.Text).Price)
+
If(Checkbox3.Value=true,
LookUp(Pricing,Title=Checkbox3.Text).Price)
+
If(Checkbox4.Value=true,
LookUp(Pricing,Title=Checkbox4.Text).Price)

EXplanation for the sum, each if function first checks the checked status of each checkbox, if checked, then lookup the datasource to find the proper record, add the ".Price" to return the proper price for each products.

the ' + ' then would sum all the value together.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Checkbox and output

Hi @Anonymous,

 

I could think out the following sicenario:

For example, we have a SharePoint custom list, have two fields, one for Porduct name and other for the price.

Then under One Screen, we have build the check box for the Products, make sure each Products name could match the one under SharePoint list, 

then, add a button, sepcify the Onselect property with the formula below:

Navigate(Screen2,ScreenTransition.None)

Under the screen2, add a text box, sepcify the Text property with the following formula:

 

If(Checkbox1.Value=true,
 LookUp(Pricing,Title=Checkbox1.Text).Price)
+
If(Checkbox2.Value=true,
LookUp(Pricing,Title=Checkbox2.Text).Price)
+
If(Checkbox3.Value=true,
LookUp(Pricing,Title=Checkbox3.Text).Price)
+
If(Checkbox4.Value=true,
LookUp(Pricing,Title=Checkbox4.Text).Price)

EXplanation for the sum, each if function first checks the checked status of each checkbox, if checked, then lookup the datasource to find the proper record, add the ".Price" to return the proper price for each products.

the ' + ' then would sum all the value together.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Checkbox and output

Thank you., it looks correct. I will have a look at it. 

 

BR, 

Helpful resources

Announcements
secondImage

New Return to Workplace

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

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response 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 (3,959)