Hi,
I'm trying to create a power app in which i have a questionnaire, with possibility to add a picture if a specific value is selected.
I'm Using a Form, and due to Lay-out limitations i can not have the capture picture together in the "Edit Form" Control.
So in case a picture needs to be taken, the current form will be submitted. and in the next screen the picture will be added. After this the user will be returned to the first screen.
in order to reduce the amount of clicks, i use a slicer (in below example called Req02) to enter the values. with a minimum value of 1, and a maximum value of 5. I also would like to change the Fill color of the DataCard in case the question was answered in a previous screen. (this to make it clear to the user which questions he already has answered.)
For this i use in the "Fill" section of the datacard below function
If(ReqVal02=Blank(),
RGBA(0,0,0,0),
RGBA(226, 250, 230, 0.7))
Via the "OnChange" i would fill in the Variable
Set(ReqVal02,Req02.Value)
But because the use of the Slicer: at the moment it will submit the form (to take the picture), it will select automatically the lowest Value, and thus it will always change the 'blank()' Value of the field even i the user didn't change them. So All questions will be marked as green (Value 1).
I tried to fix this by using the "OnChange" property of the slicer: i was hoping to block this off, So it would only register "manual" changes to the slicer:
"OnSelect":
UpdateContext({OnSel02: 1})
"OnChange"
If(OnSel02=1,
Set(ReqVal02,Req02.Value);UpdateContext({OnSel02: 0}),
Set(ReqVal02,Blank()))
"Default"
If(ReqVal02=Blank(),1,ReqVal02)
But it seems the "On Change" is triggered before the "OnSelect", so with this setup it is not possible to change the value of the slicer at all.
I have the feeling i'm over complicating it, though i don't see much alternatives now (using a dropdown would make it possible, though the user experience would not be the same).
Any advice you can give me?
Hi,
Happy that you got it sorted. You should mark your response as the answer as maybe someone might stumble on the same issue in the future.
Hi Cha_Cha,
I found the solution:
Via the "OnChange" i would fill in the Variable
Set(ReqVal02,Req02.Value)
"OnSelect":
UpdateContext({OnSel02: 1})
and with the OnVisible parameter of the Screen i put:
If(OnSel02<>1,Set(ReqVal02,Blank()));
so i'm blanking out the Values in case the values had not been changed manually. (which allowed me to keep using the slider).
The radio control could have worked, to the feeling of it is different.
Regarding the delegation warning, i did follow the tips and tricks from Reza (see minute 7:10), so i'm filtering in my data as much as possible on validated fields, but in order to get the value of a specific record i understand i Best use the "first()" instead of the Lookup function, This did fix the delegation warning now.
For the tabs, i'm using it in other apps, and will definitely do it also in the monthly audit form (to be added later).
Kind Regards,
Jean-Philippe
Hello @Jean-Philippevb
I did a short demo for both: https://youtu.be/XuY7PelXtiM
Advice for your app:
WarrenBelz
637
Most Valuable Professional
stampcoin
570
Super User 2025 Season 2
Power Apps 1919
473