Forum Discussion
Jessica_p234
Feb 18, 2021Copper Contributor
Make Datacard Read Only When user is editing form, but editable when they're creating new form
Hello, I am using PowerApps to create a SharePoint Form. I want to have a data card for "Date" that the user can change when they are creating a new form, but if they click edit in the app, it be...
derhallim
Feb 18, 2021MCT
You can achieve this by having a rule for the display mode. You can do it by following these steps:
* Select the card, on the right side panel, click on Advanced, and Unlock to change properties.
* Now while you're selecting the card, change the properties dropdown to "DisplayMode".
* In the formula, type this:
If(SharePointForm1.Mode = FormMode.New, DisplayMode.Edit, View)
Now that's basically saying, if SharePoint's form mode is New item, then make the current card (your date card) editable, otherwise make it read only (view).
* Select the card, on the right side panel, click on Advanced, and Unlock to change properties.
* Now while you're selecting the card, change the properties dropdown to "DisplayMode".
* In the formula, type this:
If(SharePointForm1.Mode = FormMode.New, DisplayMode.Edit, View)
Now that's basically saying, if SharePoint's form mode is New item, then make the current card (your date card) editable, otherwise make it read only (view).
SteveMorley1
Oct 25, 2023Brass Contributor
derhallim just because this a couple of years later, when I tried the syntax of If(SharePointForm1.Mode = FormMode.New, DisplayMode.Edit, View) - the view at the end, now needs to be DisplayMode.View