Make Datacard Read Only When user is editing form, but editable when they're creating new form

%3CLINGO-SUB%20id%3D%22lingo-sub-2146994%22%20slang%3D%22en-US%22%3EMake%20Datacard%20Read%20Only%20When%20user%20is%20editing%20form%2C%20but%20editable%20when%20they're%20creating%20new%20form%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2146994%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20PowerApps%20to%20create%20a%20SharePoint%20Form.%20I%20want%20to%20have%20a%20data%20card%20for%20%22Date%22%20that%20the%20user%20can%20change%20when%20they%20are%20creating%20a%20new%20form%2C%20but%20if%20they%20click%20edit%20in%20the%20app%2C%20it%20becomes%20read%20only%20and%20they%20cannot%20change%20it%20anymore.%20Is%20this%20possible%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2146994%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoints%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

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 becomes read only and they cannot change it anymore. Is this possible?

1 Reply
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).