cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft
Microsoft

edit mode button

Hello,

I am trying to create an Edit.from button, that the will be used only for the the SharePoint list creators not all uses

I am trying to use the below function

 

Display mode= If(User().email=createdby.email,DisplayMode.Edit,DisplayMode.View)

 

The problem that I can not fetch the createdby.email   from the sharepoint list to use it for this button . also I can use this formula to created filter for ant filed in the created form

1 ACCEPTED SOLUTION

Accepted Solutions
Memorable Member
Memorable Member

Try Display mode=

can do this a few ways.  How do you navigate to the edit Form?

 

If you are coming from a gallery I would put a Set(Varemail,ThisItem.'Modified By')

 

Then in you Edit button use

 

If(User().email=Varemail,DisplayMode.Edit,DisplayMode.View)

 

If you are not getting this way that on teh edit form I would have the source created by column hidden and use

 

If(User().email=DataCardValue?.Text,DisplayMode.Edit,DisplayMode.View)

 

 

View solution in original post

2 REPLIES 2
Memorable Member
Memorable Member

Try Display mode=

can do this a few ways.  How do you navigate to the edit Form?

 

If you are coming from a gallery I would put a Set(Varemail,ThisItem.'Modified By')

 

Then in you Edit button use

 

If(User().email=Varemail,DisplayMode.Edit,DisplayMode.View)

 

If you are not getting this way that on teh edit form I would have the source created by column hidden and use

 

If(User().email=DataCardValue?.Text,DisplayMode.Edit,DisplayMode.View)

 

 

View solution in original post

Community Support
Community Support

Hi @Karim77 :

Do you want to change the mode of the form by selecting the button?

Do you want the creator of the record to be able to modify the form?

First, let me explain what 'Create by' field is.

'Create by' is a standard field in a SharePoint list, which records the creator of the record.

Second, the key to getting a button control to change the form mode is the EditForm function.

I've made a test for your reference:

My data source:'List A'

1\Add a gallery(Gallery7)  This gallery is used to select the records we want to display in the form

Items:

 

'List A'

 

2\Add a Display form(Form5)

DataSource:

 

'List A'

 

Item:

 

Gallery7.Selected

 

3\Add a button

 

If(
    User().Email = Gallery7.Selected.'Created By'.Email, /*Determine if the current user is the creator of the record*/
    EditForm(Form5), /*Switch the form to edit mode*/
    ViewForm(Form5) /*Switch the form to display mode*/
)

 

1.jpg2.JPG

Best Regards,

Bof

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (38,702)