hi,
I have a powerapp form. It's an application form. Except fileds imported from sharepoint online list, I also add a checkbox and a submit button. When an applicant submit the form, an approval will start.
Now, when approver open the item link, the checkbox and the button can still be edited, and the checkbox value=false though applicant has checked the box. So is there any solution to this problem?
And I also want to hide the submit button while the approver open the item link ,is it possible ?
Thank you!
Solved! Go to Solution.
Hey @Anonymous ,
Exactly like @Anonymous says. Make sure you have a column in SharePoint with the name Status and you can either choose to make this a dropdown column with for example the options 'new', 'under approval', 'approved' and 'not approved' (recommended), or a Text column which u can fill manually. Your approval can be started with Flow and before the step 'Start and wait for an approval' is executed u can add a step that changes the status. As @Anonymous mentioned you can use the Displaymode option of the Button and the checkbox to add a code like:
If(Status.Value = "under approval", Disabled, Edit)
Or if you don't want the Button to be visible add this code to the Visible option:
Status.Value <> "under approval"
Is there a field in your sharepoint that stores the status? If so, you could use the "DisplayMode" value of the button, the code would look something like this.
If(Status = "Under Approval", DisplayMode.Disabled, DisplayMode.Edit)
Hey @Anonymous ,
Exactly like @Anonymous says. Make sure you have a column in SharePoint with the name Status and you can either choose to make this a dropdown column with for example the options 'new', 'under approval', 'approved' and 'not approved' (recommended), or a Text column which u can fill manually. Your approval can be started with Flow and before the step 'Start and wait for an approval' is executed u can add a step that changes the status. As @Anonymous mentioned you can use the Displaymode option of the Button and the checkbox to add a code like:
If(Status.Value = "under approval", Disabled, Edit)
Or if you don't want the Button to be visible add this code to the Visible option:
Status.Value <> "under approval"
I just create that column, but I don't know where to add the code. When I edit the Displaymode of the submit button,it doesn't show "Status" or other relevant choices. When I change "Status" into datacardvalue.selected.value, it also goes wrong. Canyou tell me how to write the code?
Thx!
Are the Checkbox and the Submit Button inside of the Form you're using? If so, you can use:
ThisItem.Status.Value
If the controls are outside of the Form you can place them inside by adding a Custom Card to your Form and placing the control inside that DataCard. Then you'll be able to use the above code.
If you are still not able to see Status, try to refresh the DataSource in the PowerApp by clicking View->Data sources->three dots of the source->Refresh.
I hope this will help you 🙂
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
257 | |
247 | |
83 | |
36 | |
30 |
User | Count |
---|---|
299 | |
269 | |
117 | |
66 | |
45 |