cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Martin_MC
Helper II
Helper II

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
Martin_MC
Helper II
Helper II

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

@Martin_MC 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

 

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.

Martin_MC
Helper II
Helper II

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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,431)