Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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

  • bhitchlock Profile Picture
    28 on at
    Re: SharePoint List Form - How to switch to Edit Form for new item after Create?

    Thanks Kris,

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

     

    Brian 

  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: SharePoint List Form - How to switch to Edit Form for new item after Create?

    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,

     

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,587 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard