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

PowerAppa Form- Hide fields while in approval

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

Hey @Anonymous ,

 

Exactly like @NP1 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 @NP1 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"

View solution in original post

4 REPLIES 4
Highlighted
Advocate II
Advocate II

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)
Highlighted
Resolver II
Resolver II

Hey @Anonymous ,

 

Exactly like @NP1 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 @NP1 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"

View solution in original post

Highlighted
Anonymous
Not applicable

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!

Highlighted

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 🙂

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,650)