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 Platform Community / Forums / Power Apps / PowerApps open correct...
Power Apps
Unanswered

PowerApps open correct form onEdit

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am a novoice in PowerApp and stuck with the following scenario, require help!
I have 4 different screens/forms associated to a single sharepoint list form.

On click of 'New', first form opens up which will have 3 options for a user to choose - Form1, Form2, Form3.
User selects any one form and is navigated to respective form, where he inputs data and saves the entry.


In this case, how should I write onEdit formula in SharePointIntegration control for 'Edit' to open the respective forms (out of 3) on click of edit icon from SharePoint list?

I have tried setting a variable to update a column value for every item creation like 'FormName' - "Form1","Form2","Form3" and then use a IF statement to navigate to the respective form but it does not work. It always opens the main form (snapshots below).

 

Please help on how will i navigate to the correct form with onEdit. Thanks in advance!

 

Main form to navigate to other forms on click of imageMain form to navigate to other forms on click of image

 

 

SPIntegration - onEditSPIntegration - onEdit

 

Categories:
I have the same question (0)
  • Milansinh Raj Profile Picture
    149 on at

    Can't you place a button on your screen?  which navigates you to your screens ?

     

    Why you want to use onEdit property only?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    When a user clicks on 'New' form, the main screen (image uploaded earlier) will open. User will be navigated to respective forms on click of image. Below are the 3 different forms.

    Form1Form1Form2Form2Form3Form3

     

    User saves the respective form details independently on each form. Now, if a user wants to edit an item from sharepoint, on click of edit, how will it be redirected to respective forms? I mean, if an item is saved from form1, it has to open form1 for edit. If an item is saved from form2, it has to open form2 for edit and so on. Please advise.

  • Milansinh Raj Profile Picture
    149 on at

    @Anonymous  What you have written on Save Button ?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    For save button's onSelect, I have written "SubmitForm(Form1)" for form1, "SubmitForm(Form2)" for form2 and "SubmitForm(Form3)" for form3.

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

    Hi @Anonymous ,

    Do you add a FormName column (Single line text column) in your SP list to store the Form's name within your app?

    How do you update the FormName column in your SP list from your app? Could you please share a bit more about the formula?

     

    I agree with your thought almost, but based on the formula that you mentioned, I think there is something wrong with it.

    I have made a test on my side, please take a try with the following workaround:

    Set the OnEdit property of the SharePointIntegration control to following:

    Set(
     editFormVar,
     SharePointIntegration.Selected.FormName /* <-- Modify formula here. Please do not use Value() function to convert the FormName value */
    );
    If(
     editFormVar = "Form1",
     Navigate(ParticipantScreen1Edit, ScreenTransition.None),
      editFormVar = "Form2",
     Navigate(ParticipantScreen2Edit, ScreenTransition.None),
      editFormVar = "Form3",
     Navigate(ParticipantScreen3Edit, ScreenTransition.None)
    )

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-xida-msft,

     

    You are right, I have added the FormName column (SLT) in my list and update it's value on onSelect property of Save button from each form: Set(varForm,"Form1"), Set(varForm,"Form2") and Set(varForm,"Form3") and set the default value of FormName to 'varForm'. 

     

    I have also set the onVisible property of ParticipantScreen1Edit to EditForm(ParticipantForm1Edit), ParticipantScreen2Edit to EditForm(ParticipantForm2Edit) and so on.

     

    I did try your below solution and it works however, there are still 2 more issues. 

    1. When an item opens for edit, it still opens the main screen(which has 3 options to choose) and then refreshes and opens the respective form.

    2. When I edit an item (say form1 item), it opens it's respective form for edit and when I open another item which was saved from form2, it still opens form1 for edit. When I reload the whole page(sharepoint list) and then select form2 item for edit, it opens the right form, which means it opens the right form every time only on reload of page and not otherwise.

     

    Please help me to get over these issues and thanks a lot for your help so far.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Also tried Refresh('DataSource') on AppStart and also onSelect, but no luck!


    @Anonymous wrote:

    Hi @v-xida-msft,

     

    You are right, I have added the FormName column (SLT) in my list and update it's value on onSelect property of Save button from each form: Set(varForm,"Form1"), Set(varForm,"Form2") and Set(varForm,"Form3") and set the default value of FormName to 'varForm'. 

     

    I have also set the onVisible property of ParticipantScreen1Edit to EditForm(ParticipantForm1Edit), ParticipantScreen2Edit to EditForm(ParticipantForm2Edit) and so on.

     

    I did try your below solution and it works however, there are still 2 more issues. 

    1. When an item opens for edit, it still opens the main screen(which has 3 options to choose) and then refreshes and opens the respective form.

    2. When I edit an item (say form1 item), it opens it's respective form for edit and when I open another item which was saved from form2, it still opens form1 for edit. When I reload the whole page(sharepoint list) and then select form2 item for edit, it opens the right form, which means it opens the right form every time only on reload of page and not otherwise.

     

    Please help me to get over these issues and thanks a lot for your help so far.

     

     


     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard