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 / Create Submit and Add ...
Power Apps
Answered

Create Submit and Add Another button and retain certain data from last submit (also have submit and finish)

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

 

We've created an app for vehicle permitting that saves to a sharepoint list then sends off for approval etc through flows.

 

Have successfully created clear and submit form buttons, however I would like to have an additional SUBMIT option to submit and add another, which would clear most data cards but keep certain cards from the last submit (ie applicant name number etc)

 

I've done a pretty exhaustive search but can't find anything that allows me to do this from the submit button and still allow me to have a submit and finish, all possibilities are blanket and don't give both possibilities.

 

Thanks,

Categories:
  • eka24 Profile Picture
    20,925 on at

    You can create a variable on the Onsuccess property of the form. 

    Set(VarLast,FormName.LastSubmit)

     

    Then Use the variable in the default of the Textbox example:

    VarLast. ID

    VarLast.Name

     

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

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

    Hi @Mstace ,

    Do you want to add a new form entry and retain certain data from previous submission when you press the additional submit button?

     

    Based on the needs that you mentioned, I have made a test on my side, please take a try with the following workaround:

    Add a "Additional Submit" button in your canvas app. Set the OnSelect property to following:

    SubmitForm(EditForm1);
    NewForm(EditForm1);
    Set(IsDuplicate, true)

    Set the OnSuccess property of the Edit form to following:

    Set(LastSubmitted, EditForm1.LastSubmit)

     

    Set the OnSelect property of the "Submit" button (original submit button) to following:

    SubmitForm(EditForm1);
    Set(IsDuplicate, false);
    Back()

     

    Within your EditForm1, you could set default value for these certain fields where you want to retain data from previous submission through the LastSubmitted variable. E.G. Set the Default property of the Text Input Box inside the Text field data card to following:

    If(
     EditForm1.Mode = FormMode.New,
     If(
     IsDuplicate = true && !IsBlank(LastSubmitted),
     LastSubmitted.TextField1
     ),
     Parent.Default
    )

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

  • Mstace Profile Picture
    2 on at

    @v-xida-msft 

     

    Yes this is the direction in which i was heading.

     

    I've made the changes as per post however it still creates a blank new form on submission for the additional button, the original submit works successfully.

     

    The first Data Card is as below

    If('FSPL Vehicle Permit (working)'.Mode = FormMode.New,If(IsDuplicate = true && !IsBlank(LastSubmitted),LastSubmitted.'Applicants Name'),Parent.Default)

     

    Additional submit is as follows

    SubmitForm('FSPL Vehicle Permit (working)');NewForm('FSPL Vehicle Permit (working)');Set(IsDuplicate, true)

     

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

    Hi @Mstace ,

    Please make sure the LastSubmitted variable is populated with proper record value.

     

    Please modify the formula within the OnSelect property of the "Additional Button":

    Set(IsDuplicate, true);
    SubmitForm('FSPL Vehicle Permit (working)');
    

     

    Set the OnSuccess property of the 'FSPL Vehicle Permit (working)' to following:

    Set(LastSubmitted, 'FSPL Vehicle Permit (working)'.LastSubmit);
    If(
     IsDuplicate = true,
     NewForm('FSPL Vehicle Permit (working)'),
     ResetForm('FSPL Vehicle Permit (working)')
    )

     

    Set the Default property of the 'Applicants Name' Text Box to following:

    If(
     'FSPL Vehicle Permit (working)'.Mode = FormMode.New,
     If(
     IsDuplicate = true && !IsBlank(LastSubmitted),
     LastSubmitted.'Applicants Name',
     Parent.Default
     ),
     Parent.Default
    )

    Please make sure the LastSubmitted variable is populated with proper record value.

     

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard