Solved! Go to Solution.
Hi @myonlywan,
Please take a try to set the Default property of the Checkbox control (Checkbox1) to following formula:
If(EditForm1.Mode=FormMode.New,false,true)
Note: The EditForm1 represents the Edit form control within your app.
Set the DisplayMode property of the field (that you want to gray out) to following formula:
If(Checkbox1.Value=true,DisplayMode.Edit,DisplayMode.Disabled)
Best regards,
Kris
Hi myonlywan
You can use the control 'DisplayMode' instead of 'Visible':
I suggest something like:
1. OnVisible property of screen:
UpdateContext({ChangeDisplayMode: DisplayMode.Edit})
2. Set DisplayMode property of your field to:
ChangeDisplayMode
3. OnSelect property of your checkbox is:
UpdateContext({ChangeDisplayMode: DisplayMode.Disabled})
Let me know if that resolves your query.
It works! Thanks so much
oh, i encounter an problem, when i unchecked, the comment box is disable.
but when i checked it again, the comment box is still disable.
Any idea
Hi @myonlywan,
Could you please share a bit more about your app's configuration?
I have made a test on my side, please take a try with the following workaround:
Set the DisplayMode property of the field (that you want to gray out) to following formula:
If(Checkbox1.Value=true,DisplayMode.Disabled,DisplayMode.Edit)
Note: The Checkbox1 represents the Checkbox control within your app.
The GIF image as below:
Best regards,
Kris
Thanks, it seem working now,..
in my case, if a user wanted to give comments, he will check the box "Comments"
and the comment text box will be editable.
What would i need to change if i need the checkbox to be unchecked when a new form is created.
I tried checkbox default to false.but it doesnt work.What else must i change?Thanks so much
Hi @myonlywan,
Please take a try to set the Default property of the Checkbox control (Checkbox1) to following formula:
If(EditForm1.Mode=FormMode.New,false,true)
Note: The EditForm1 represents the Edit form control within your app.
Set the DisplayMode property of the field (that you want to gray out) to following formula:
If(Checkbox1.Value=true,DisplayMode.Edit,DisplayMode.Disabled)
Best regards,
Kris
Thanks so much, It work perfectly. Powerapps is really powerful with these formula...got lots to learn
User | Count |
---|---|
263 | |
110 | |
92 | |
55 | |
41 |