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 / How to submit form in ...
Power Apps
Unanswered

How to submit form in powerapps and stay on same item

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

How to customize SharePoint form for New record to be able to enter required fields, submit form and stay on same form and continue to fill rest of fields?

 

When I SubmitForm, Pawerapp go to first record of the list.

 

I need submit form because I need to have new ID for second list (entity relationship)

Categories:
I have the same question (0)
  • v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Did you mean the auto-generated app created in PowerApps site by connecting to SharePoint list? 

     

    If it's the former, then this could be achieved by setting the OnSuccess property of the edit form to:

    false

    By default, it should be:

    Back()

    Regards,

    Mona

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-monli-msft,

     

    This is complete scenario…

     

    Our customer have 3 sp list: Personal information, Contact Information and Job History. Personal info list is primary list and his ID we need to write in other two list as foreign key (entity relationship 1toMany).

     

    We start to customize form for Personal Info for New, Edit and View items. For the purpose of UX we need to bring other two form (Contact info, Job History) on same screen. User see only Personal info list in SharePoint and when click on New button sp open PA form with all 3 list… this is print screen:

     

    Beleška 2019-01-23 203424.jpg

     

    We manipulate with Visible property of all 3 list on same screen. Depends on which Menu Item is select we set Visible property of that form. Very simple.

     

    Everything is perfect when user select to view one previous entered item. Form Personal info show all fields, when click on Job History, we set Visible property for Personal info form on False and set Visible property of Job History form on True and with this function in Items property of form/gallery

     

    Filter(JobPosition, ContactID = SharePointIntegration.Selected.ID)

     

    We show all related dates.

     

    Problem is when user start with New button on list for Personal info and write all required fields in Personal info and click on Job history menu item. In this moment we don’t know ID of Personal list to give it to Job history form. We need to SubmitForm Personal info when user click on Job history menu (or contact menu). When we SubmitForm, PA write all necessary fields in SP and reset form on the first item in list but we need to stay on new item and show empty form of Job History with button Add New Job…

     

    My question is How to submit form and stay on Last added item?

     

    In OnSucess property I use this:

    If(_menuItemSelected="Job History", false, ResetForm(SPFormAdresar);RequestHide())

    Item of form:

    If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First(Adresar),SharePointIntegration.Selected)
  • PytByt Profile Picture
    943 on at

    hi @Anonymous 

     

    have you solved your problem?

     

    because i need to do 2 submit at the different time in the same table of the SP list, just like yours:

    "My question is How to submit form and stay on Last added item?"

  • CU07080701-0 Profile Picture
    on at

    Yep same issue for me... Mona's answer does not work.

    I had previously solved it by changing
    Form On Success to: DisplayMode.Edit
    And Form Item to: If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),Last(MyList),SharePointIntegration.Selected)


    However, doing this on a new SharePoint list customised form doesn't seem to work anymore. It still works on the old list!

  • HughDubya Profile Picture
    4 on at

    for the OnSuccess function in the form properties, you can also use:

     

    Navigate(EditScreen, ScreenTransition.None)

     

    This will just loop you back to the same screen provided EditScreen is the name of your screen. May be different for you depending on what you called it.

     

  • Soba Profile Picture
    3 on at

    This actually worked for me, I'm not sure why it isn't for you, but I did have false for OnSuccess to make sure it had no effect on the form. Thanks for the solution!

  • joeinmay Profile Picture
    205 on at

    I tested it and works fine:

    Step1:
    New Button
    New Button: OnSelect > Set(varFM,FormMode.New); ResetForm(Form1)

     

    Step2:
    On the form
    Submit Button: OnSelect Property > If(FM=FormMode.New, SubmitForm(Form1); Set(getLastID,Form1.LastSubmit.ID);Set(varFM,FormMode.Edit),SubmitForm(Form1))

     

    Form: Default Mode Property > varFM
    Form: Item Property > If(varFM=FormMode.Edit,LookUp(**Source**,ID=getLastID))

  • anobongjimwel Profile Picture
    2 on at

    Simple, go "Back()" then "Navigate(Self)" after you save. No Refresh or ResetForm needed. Thank me later 🙂

    image_2021-06-23_110822.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard