cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jja
Level: Powered On

Disable all form fields if content approval status is approved

Hi

is there a way to make all read only fields using customized form in powerapps when content approval status is approved. I also dont want to show content approval status in form it should stay only in sharepoint list

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Disable all form fields if content approval status is approved

Hi @jja ,

The two functions that you want are designed in the custom form.

Could you tell me approval status field's data type?

I assume that it is a choice field.

 

1)Set the records' field all read-only if approval status is approved.

Set SharePointIntegration's OnEdit:

If(SharePointIntegration.Selected.approvalstatus.Value="Approved",
ViewForm(SharePointForm1),
EditForm(SharePointForm1))8151.PNG

 

2)In custom form, set the approval status's data crad's Visible: false8152.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Super User
Super User

Re: Disable all form fields if content approval status is approved

Yes this would be possible.

Add the Content Approval status field to the Form and hide it. Then use an IF statement in the display mode of each card in the Form to set it to either Edit or View based on the Approval status field.

 

It should be noted that although this will prevent editing those fields using PowerApps it won't prevent editing the SharePoint list/file metadata directly in SharePoint.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
RezaDorrani
Level 10

Re: Disable all form fields if content approval status is approved

Hi @jja 

 

Best option would be to check the item approval status and then redirect to display form in App

If you select the SharePointIntegration control on the left Panel

It has an OnEdit function

In this function you can check the approval status and accordingly set ViewForm or EditForm

This way you dont have to individually mark all fields to read only and write any if statements

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Community Support Team
Community Support Team

Re: Disable all form fields if content approval status is approved

Hi @jja ,

The two functions that you want are designed in the custom form.

Could you tell me approval status field's data type?

I assume that it is a choice field.

 

1)Set the records' field all read-only if approval status is approved.

Set SharePointIntegration's OnEdit:

If(SharePointIntegration.Selected.approvalstatus.Value="Approved",
ViewForm(SharePointForm1),
EditForm(SharePointForm1))8151.PNG

 

2)In custom form, set the approval status's data crad's Visible: false8152.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jja
Level: Powered On

Re: Disable all form fields if content approval status is approved

My approval status field is standart sharepoint fields when i enabled content approval in list settings but i have no problems creating another field and update it via flow cause i understood powerapps can't get content approval value from standart approval content functionality

 

I will test it and let you know the results

jja
Level: Powered On

Re: Disable all form fields if content approval status is approved

It does the job exactly as i wanted! I also removed quick edit

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 173 members 5,372 guests
Please welcome our newest community members: