Skip to main content

Notifications

Community site session details

Community site session details

Session Id : ckX6xoma50BE+3HdfZ61oR
Power Apps - Building Power Apps
Unanswered

PowerApps open correct form onEdit

Like (0) ShareShare
ReportReport
Posted on 27 Mar 2019 17:42:35 by

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

 

  • Community Power Platform Member Profile Picture
    on 29 Mar 2019 at 08:32:00
    Re: PowerApps open correct form onEdit

    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.

     

     


     

  • Community Power Platform Member Profile Picture
    on 29 Mar 2019 at 07:41:41
    Re: PowerApps open correct form onEdit

    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.

     

     

  • v-xida-msft Profile Picture
    on 29 Mar 2019 at 02:34:06
    Re: PowerApps open correct form onEdit

    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
    on 28 Mar 2019 at 12:46:34
    Re: PowerApps open correct form onEdit

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

  • Milansinh Raj Profile Picture
    149 on 28 Mar 2019 at 12:39:20
    Re: PowerApps open correct form onEdit

    @Anonymous  What you have written on Save Button ?

  • Community Power Platform Member Profile Picture
    on 28 Mar 2019 at 07:11:03
    Re: PowerApps open correct form onEdit

    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 27 Mar 2019 at 19:02:33
    Re: PowerApps open correct form onEdit

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

     

    Why you want to use onEdit property only?

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 110 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 77

#3
stampcoin Profile Picture

stampcoin 52

Overall leaderboard
Loading started