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 / SharePoint List Form -...
Power Apps
Unanswered

SharePoint List Form - How to switch to Edit Form for new item after Create?

(0) ShareShare
ReportReport
Posted on by 28

Hi Everyone,

 

I have a SharePoint list with custom New, Edit and View forms. Upon a successful save I would like to switch to the Edit Form with the new item displayed. How do I set the item of the Edit form to the last submitted item? Or is it possible to update the Selected property of the SharePointIntegration control somehow?

 

Thanks for any suggestions.

 

Brian

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @bhitchlock,

    Do you custom a form for your SP list using PowerApps?

    Do you want to switch to the Edit form after you created a new item in your SP list?

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

     

    2.JPG

    I created separated forms to create, edit or show the list item in custom form via the following blog:

    https://powerapps.microsoft.com/en-us/blog/separate-custom-forms/

    On your side, you could consider take a try to custom your three separated forms as a mentioned above.

    Set the OnNew property of the SharePointIntegration control to following:

     

    Set(CurrentSubmitted, Blank()); /* <-- Reset CurrentSubmitted variable */
    Set(SharePointFormMode, "CreateForm");
    NewForm(CreateItemForm);
    Navigate(CreateScreen, ScreenTransition.None)

    Set the OnEdit property of the SharePointIntegration control to following:

     

     

    Set(CurrentSubmitted, Blank()); /* <-- Reset CurrentSubmitted variable */
    Set(SharePointFormMode, "EditForm");
    EditForm(EditItemForm);
    Navigate(EditScreen, ScreenTransition.None)

    Set the OnSave property of the SharePointIntegration control to following:

     

     

    If(SharePointFormMode="CreateForm", SubmitForm(CreateItemForm), If(SharePointFormMode="EditForm", SubmitForm(EditItemForm)))

     

     

    Set the OnSuccess property of the CreateItemForm (New Form) to following:

     

    Set(CurrentSubmitted, CreateItemForm.LastSubmit);
    ResetForm(CreateItemForm);
    EditForm(EditItemForm);
    Set(SharePointFormMode, "EditForm");
    Navigate(EditScreen,ScreenTransition.None)

    On your side, you should type:

     

    Set(CurrentSubmitted, YourNewForm.LastSubmit);
    ResetForm(YourNewForm); 
    EditForm(YourEditForm);
    Set(SharePointFormMode, "EditForm")
    Navigate(EditScreen,ScreenTransition.None)

    Set the Item property of the EditItemForm (Edit Form) within your Edit screen to following:

     

     

    If(
     IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),
     First('20190211_case5'),
     If(!IsBlank(CurrentSubmitted), CurrentSubmitted, SharePointIntegration.Selected)
    )

    On your side, you should type:

     

     

    If(
     IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),
     First('YourSPList'),
     If(!IsBlank(CurrentSubmitted), CurrentSubmitted, SharePointIntegration.Selected)
    )

    Please check the attached GIF screenshot for more details:

     

     

    Best regards,

     

  • bhitchlock Profile Picture
    28 on at

    Thanks Kris,

    This works! I need to test more, but so far so good.

     

    Brian 

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard