web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

edit mode button

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

Categories:
  • Verified answer
    leyburn19 Profile Picture
    2,157 on at

    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)

     

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard