cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyberco01
Level 8

Some fields editable by created by person only in Powerapps form

I have a single powerapps form linked to SP List. I have single form for New, Edit, View. I need some fields to be editable by the Created By person only and disabled for rest.

I tried to achieve using below formula. The issue is when i click +New, All the fields with this formula is read-only.

Kindly Help.

 

CreatorEdit.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Some fields editable by created by person only in Powerapps form

Hi @cyberco01 ,

Do you create a custom form using PowerApps within your SP List?

Do you want some fields to be editable by the Created By person only and disabled for rest when the user edit an existing record rather than new a record?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Within your Edit form, please unlock the corresponding Data cards where you want to apply your condition formula. Then set the DisplayMode property of the Data card to following:

If(
   SharePointForm1.Mode = FormMode.New,  /* <-- SharePointForm1 represents the Edit form in your app */
   DisplayMode.Edit,
   If(
       ThisItem.'Created By'.Email = User().Email,
       DisplayMode.Edit,
       DisplayMode.View
   )
)

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
panand99
Level 10

Re: Some fields editable by created by person only in Powerapps form

Hi @cyberco01 

 

You can create a varaible frmMode on OnStart of screen - UpdateContext({frmmode:If(frmRequest.Mode=FormMode.Edit,"Edit","New")})

 

Then, you can use this in your field display mode with 'if' condition

 

if(frmmode="New" & <your formula>)

cyberco01
Level 8

Re: Some fields editable by created by person only in Powerapps form

Hi @panand99 ,

 

Can you please guide me little more. Where exactly must I create the variable frmMode

panand99
Level 10

Re: Some fields editable by created by person only in Powerapps form

OnVisible of your screen

Community Support Team
Community Support Team

Re: Some fields editable by created by person only in Powerapps form

Hi @cyberco01 ,

Do you create a custom form using PowerApps within your SP List?

Do you want some fields to be editable by the Created By person only and disabled for rest when the user edit an existing record rather than new a record?

 

Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

Within your Edit form, please unlock the corresponding Data cards where you want to apply your condition formula. Then set the DisplayMode property of the Data card to following:

If(
   SharePointForm1.Mode = FormMode.New,  /* <-- SharePointForm1 represents the Edit form in your app */
   DisplayMode.Edit,
   If(
       ThisItem.'Created By'.Email = User().Email,
       DisplayMode.Edit,
       DisplayMode.View
   )
)

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

Top Kudoed Authors
Users Online
Currently online: 52 members 3,333 guests
Please welcome our newest community members: