cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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.
4 REPLIES 4
panand99
Level 8

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 8

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.