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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add an Edit button to ...
Power Apps
Answered

Add an Edit button to a single-screen form

(0) ShareShare
ReportReport
Posted on by

I have a 1-screen power app form. I would like to add an Edit button so that when a user opens the form from the SharePoint list, the Edit button will appear and by clicking it, the form then moves to Edit Mode and the button becomes hidden.

 

I also need the button hidden when a new form is created (in other words, the only time the Edit button should be visible is when a user initally opens an existing form).

 

I realize the default SharePoint 'Edit All' button basically accomplishes this, but the business has asked that a custom button to be added.

Categories:
I have the same question (0)
  • Luke_Timmins Profile Picture
    176 on at
    I assume you are using an embedded powerapp in sharepoint.

    You basically need to use a variable set it to true when the page is visible and set the buttons visibility to the value of the variable.

    You would then update the variable when the button is clicked and thus making it invisible.

    You could probably use the same variable to change the display mode of the form

    I hope this helps.
    Luke
  • v-yutliu-msft Profile Picture
    on at

    Hi @Anonymous ,

    Could you tell me

    1)Before you click the edit button, what's the form's mode? or maybe it is invisible until you click the button?

    2)When will the edit button appear? Do you want it appears just when you edit the form? Will the button appear when you view form and create new record?

     

    I assume that

    1)Before you click the edit button, the form is invisible. If you click the edit button, the form becomes visible and mode is edit.

    2)The edit button only appears when you edit the form.

    Based on your description, I've made a similar test for your reference:

    1)customize the form in PowerApps8291.PNG

     

    2)Set FormScreen1's OnVisible:

    If(SharePointForm1.DisplayMode=DisplayMode.Edit,Set(var,true))

    3)Set edit button's Visible: var

      Set edit button's OnSelect: 

    Set(var,false) //use a variable to change the button's visible

    4)Set SharePointForm1's Visible:

    If(Button1.Visible=true,false,true)

    8292.PNG

    Please note that Visible is an input property, you could not set it outside.

     

     

    Then, when you edit a record, firstly it only appears en edit button , if you click the button, the edit form will appear.8293.PNG

     

     

    Best reagrds,

  • Community Power Platform Member Profile Picture
    on at

    Hi Phoebe...thank you for your quick response.

     

    I have included answers to your questions below. I hope they will help clarify what I'm trying to accomplish.

     

    1)Before you click the edit button, what's the form's mode? or maybe it is invisible until you click the button?

    Before clicking the Edit button, the form is in View mode. In other words, a user opens a previous record from the SharePoint list and to view the form where they can see and click the Edit button in order to update or modify the form. In all other modes, the Edit button should be hidden.

     

    2)When will the edit button appear? Do you want it appears just when you edit the form? Will the button appear when you view form and create new record?

    The Edit button should only appear in View mode when a user opens a previous record from the SharePoint list to view the form. After clicking Edit, the button should not be visible. The button should not appear when creating NEW records.

     

    I attempted what you described in my PowerApp and ran into a couple of issues 1) The Edit button appeared on the form when creating a new record and 2) When opening an existing record, SharePointForm1 was blank. The previous data that was entered on the existing record should be visible in the form.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Figured it out...went to the Visible property in the Advanced menu and entered:

     

    SharePointForm.Mode=FormMode.View

     

    This fixed that issue, but now have a new one. What do I enter in the OnSelect for the Edit button to move the form to the Edit mode? Remember, this is a single screen form. I am not using multiple screens.

  • Robyng Profile Picture
    60 on at

    I added an image to the page but when I scroll down the image moves down. Could you help me out ?

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Figured this one out as well

     

    Used EditForm(SharePointForm1);Navigate (SharePointForm1, ScreenTransition.None)

     

    Both issues resolved...Edit button now only appears when an existing record is opened. After clicking Edit button, button is hidden and form moves from View mode to Edit mode.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard