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 / I want to submit a for...
Power Apps
Answered

I want to submit a form but also retain some of the data for the next form.

(0) ShareShare
ReportReport
Posted on by 17

Hello,

 

I am building an app to track my company's inventory using a barcode scanner and a form. I have everything built out and working but now I am going back and tweaking some things to make it easier to use. One of the things I got complaints about was entering the same data over and over when only a barcode was changing. Is there a way for me to fill out a form, submit that form, reset it for a new entry, and keep some of the existing data so we don't have to constantly keep typing in the same things over and over again? I have read dozens of forums trying to get help with this issue but nothing seems to be working. 

 

Attached below are some screenshots of my code. 

 

I would like everything to remain the same except for the "Barcode" field.

Inventory_Mod_Entry.PNG
onsuccess formula.PNG
Submitbutton Formula.PNG
Categories:
  • cmyoung07 Profile Picture
    125 on at

    I would create a set of variables for each field. Then set the default value of each field to their corresponding variables.

     

    You can set these variables' values when they submit. And I am assuming you will want to initialize these variables to blank when they first open the form.

     

    You may also want to add a clear form icon, that when selected will reset the variables back to blank and then reset form.

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Grant886 

    Yes, so this is quite simple to do.  There are some changes in order though.  The first is regarding the Item property of your form.  If your form is in New mode, then you will want to put it in Edit mode and never issue a NewForm function on it.

     

    In your OnSuccess, set one variable - Set(glbCurrentRecord, Self.LastSubmit)

     

    Then, on the Item property of your Form...

    A) If you are only creating new records, then set the formula to:

    Patch(Coalesce(glbCurrentRecord, Defaults(yourDataSource)), {ID: Blank(), yourBarCodeColumnName: Blank()})

     

    B) if you are editing records with the form, then set the formula to:

    Patch(Coalesce(glbCurrentRecord, <yourCurrentItemPropertyHere>), {ID: Blank(), yourBarCodeColumnName: Blank()})

     

    I hope this is helpful for you.

  • Grant886 Profile Picture
    17 on at

    That worked perfectly! Thank you so much!

  • Grant886 Profile Picture
    17 on at

    So the form does exactly what I would like it to do, but it broke my "reset form" button. How would I fix that to clear the entire form if I needed to enter all new data?

    ResetForm_Button.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

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 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard