Hi,
I have a star rating system from 1-5, when we refresh the page the ratings should clear and be set to the default of 0. However we do not want anyone to skip those questions and output a rating of 0 so would like the button to move to the next page to be disabled when the rating is 0 (rating not filled in).
Any help would be great.
Solved! Go to Solution.
Hi @Anonymous
Assuming that your button calls the Navigate function, you can wrap this in a conditional statement to prevent the navigation when the rating value is 0. The formula would look something like this:
If(Rating1.Value <> 0, Navigate(YourOtherScreen, ScreenTransition.Cover), false )
Hi @Anonymous
Assuming that your button calls the Navigate function, you can wrap this in a conditional statement to prevent the navigation when the rating value is 0. The formula would look something like this:
If(Rating1.Value <> 0, Navigate(YourOtherScreen, ScreenTransition.Cover), false )
Thanks for the reply.
The button actually patches to my SP list rather than Navigate.
Can I use
If(Rating1.Value <> 0,
part of the code to prevent the patch?
Yes, you can use that syntax to prevent the patch.
Hi would the code be like this:
If(Rating1.Value<>0, Patch( SPList,Defaults(SpList), {Columnname:Dropdownname.Selected.Value} )),false
Not sure if this is right?
I think your closing bracket is in the wrong place, but assuming that your rating control is called Rating1, then this code should work.
If(Rating1.Value<>0,
Patch(SPList,Defaults(SpList), {Columnname: Dropdownname.Selected.Value} ),
false
)
Thanks, got it working so that it won't navigate or patch when the rating is 0.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
203 | |
187 | |
81 | |
50 | |
37 |
User | Count |
---|---|
294 | |
248 | |
123 | |
74 | |
55 |