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

DisplayMode.View still allows edit. How to disallow edit entirely?

Hi there. I've created a custom form for a SharePoint list, and I'm trying to lock all the fields down entirely so that they are not editible. No one needs to or should be amending the fields directly on the list because the entries are created by way of a FORMS form and any updates to fields happen via an automated Flow. I made sure to lock the fields down in PowerApps by way of the DisplayMode.View for each field, but when this is published, if you simply click 'Edit All' on the SharePoint item it makes the fields editable, and I don't want to allow that to happen. How can I lock these fields entirely, and not allow people to edit them?

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

To follow up, I went down each and every field - unlocked them - and entered DisplayMode.View into the DisplayMode field and this makes them completely non-editable. If anyone knows why it doesn't work simply setting the default display mode to 'View' at parent level then please let me know. But I will mark this as solved otherwise.

View solution in original post

3 REPLIES 3
CNT
Super User
Super User

@Anonymous Setting the EditForm Mode to View will work only within PowerApps and not in the SharePoint Portal. If you want to stop users from Editing in the SharePoint Portal you'll have to change the List Permissions,

CNT_0-1624270740104.png

 

Anonymous
Not applicable

Hi, thanks for the response. I've since been trying various things and found that if I put a rule within the field itself, rather than have it simply inherit from the parent item, then it actually does lock it down entirely. Specifically, I put the following rule into the DisplayMode of one field to test (where DataCardValue1 = that field itself, basically locking it down if it has data)

If(IsBlank(DataCardValue1), DisplayMode.Edit,DisplayMode.View)

And now, when I go to the list and hit 'Edit All' all fields aside from that one field become editable. Which makes me think I need to go through and put a rule into every individual field rather than simply at the parent level. Not sure why it needs a specific in-line rule and can't simply accept DisplayMode.View at parent level, but I might keep testing other methods.

Anonymous
Not applicable

To follow up, I went down each and every field - unlocked them - and entered DisplayMode.View into the DisplayMode field and this makes them completely non-editable. If anyone knows why it doesn't work simply setting the default display mode to 'View' at parent level then please let me know. But I will mark this as solved otherwise.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,515)