Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Submit form retain fields to prepopulate on new form....while using reset form

(0) ShareShare
ReportReport
Posted on by

I have two forms: form1 and form2.

 

I want to complete fields on form1 and have three of those fields auto-populate on form2. I have the auto populate working for the three fields. However, after the user hits submit on Form1 and navigates to Form2 I need to reset Form1 back to new mode. But when I do that it clears/erases all of the auto populated fields on Form2.

 

Currently using this formula in the default data cards for the fields on Form2 that need to be autopopulated. I have 3 instances with different field names but the format is the same.

If(!IsBlank(form1.LastSubmit.FactNumber),form1.LastSubmit.FactNumber,ThisItem.'PR Number')

 

On Success for Form1 currently has nothing but needs to reset the form but keep the last submitted data for the 3 fields on Form2

 

 

  • mjackson122 Profile Picture
    on at
    Re: Submit form retain fields to prepopulate on new form....while using reset form

    Okay in Form2 I changed default mode to edit. I also added the following to the items:

     

    Patch(Defaults(BEFactTable),{'PRNumber': varGlbRecord.factnumber}) and I receive the following error "Invalid formula expected a value compatible with data source"

     

    FYI just in case it's helpful factnumber is the columns value I am trying to retain from Form1

     

    I have two tables in the dataverse

    BEFact used for Form2

    GeneralV used for Form1

     

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Submit form retain fields to prepopulate on new form....while using reset form

    @mjackson122 

    That is correct.  The NewForm will just put the form back into new record mode.

  • mjackson122 Profile Picture
    on at
    Re: Submit form retain fields to prepopulate on new form....while using reset form

    Just to clarify for on success "NewForm(yourFormName)" is to reset form1 correct so the formula would be NewForm(Form1)?

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Submit form retain fields to prepopulate on new form....while using reset form

    @mjackson122 

    Put your Default properties back to the default properties.  Otherwise you will be breaking the Unsaved property function on the form.

     

    On Form1 in the OnSuccess action formula, but the following:

    Set(glbRecord, Self.LastSubmit); 

    NewForm(yourFormName)

     

    Then for your other forms, if you are creating new records from them, then set the default mode to Edit and DO NOT issue a NewForm on those forms, only EditForm if needed.

    And, set the Item property of those forms to: 

       Patch(Defaults(yourDataSource), {columnYouWant1: glbRecord.columnYouWant1, columnYouWant2: glbRecord.columnYouWant2, ...etc...})

     

    This will provide the functionality you are looking for.

     

    I hope this is helpful for you.

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard