Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

New item is showing old data

(0) ShareShare
ReportReport
Posted on by 248

Hi all.

 

Hope all are well.  So what i did was merged 3 separate paper forms into 1 SharePoint list.  I gave each form it's own screen and one screen has the navigation links to the form screen.  When the user opens the form, the 1st screen they see is the screen with navigation links.  The user will then click on the link to the form that they need to fill out.  I am treating each form as its own.  I added a button at the end of each screen that submits that screens data for that form.

 

All 3 nav buttons have OnSelect property set to (based on btn): 

OnSelect:  And(Set(btnIntIn, true), Set(btnRep, false),Set(btnUSBound, false), Set(varFormType, "International Initiation"));Navigate(InternationalInitiationScreen);ScreenTransition.None

 

Every form has this for the Item property:  

Item:  If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First([@'International Initiation Form']),SharePointIntegration.Selected)

 

For the SharePoint integration properties:  (of course based on the type OnSave, OnEdit, OnView, OnNew and OnCancel):  

OnNew:  If(varFormType="International Initiation", NewForm(InternationalInitiationForm), If(varFormType="US Bound", NewForm(USBoundForm)), NewForm(RepatriationForm))

 

The OnSelect property for every forms Submit button is SubmitForm(InternationalInitiationForm);  <-- the name of the form changes based on the form the user selected.

 

The issue that i am facing is that when i click on New Item (from the Sharepoint List) it displays the 1st records data.  Not a blank form.  Also, when i try to edit the record i get the first screen with the nav links.  I havent been able to figure out how to display the form that was filled out when the user wants to edit an existing record.

 

Any help would be appreciated.  

 

Thank you for your time.

Categories:
  • v-xida-msft Profile Picture
    on at
    Re: New item is showing old data

    Hi @Misa ,

    Sure. Please take a try with the solution I provided above, check if it could help in your scenario.

     

    Best regards,

  • Misa Profile Picture
    248 on at
    Re: New item is showing old data

    @v-xida-msft 

     

    Hi.  My apologies for the delayed response.  I havent had a chance to full test it.  Hopefully I can do this in the next couple of days.

     

    Thank you for your help.

  • Verified answer
    v-xida-msft Profile Picture
    on at
    Re: New item is showing old data

    Hi @Misa ,

    Could you please show more details about the issue within your app?

     

    Based on the issue that you mentioned, I think you need to make changes with the formula within the OnNew property of the SharePointIntegration control:

     

    Within the first screen, set the OnSelect property of the "Navigation" buttons to following (based on corresponding buttons😞

    Set(btnIntIn, true);
    Set(btnRep, false);
    Set(btnUSBound, false);
    Set(varFormType, "International Initiation");
    Navigate(InternationalInitiationScreen)

    .....

     

    Set the OnNew property of the SharePointIntegration control to following:

    NewForm(InternationalInitiationForm);
    NewForm(USBoundForm);
    NewForm(RepatriationForm)

    Set the OnEdit property of the SharePointIntegration control to following:

    EditForm(InternationalInitiationForm);
    EditForm(USBoundForm);
    EditForm(RepatriationForm)

    Set the OnView property of SharePointIntegration control to following:

    ViewForm(InternationalInitiationForm);
    ViewForm(USBoundForm);
    ViewForm(RepatriationForm)

     

    Please check and see if the following blog would help in your scenario:

    https://powerapps.microsoft.com/es-es/blog/separate-custom-forms/

     

    Best regards,

  • Misa Profile Picture
    248 on at
    Re: New item is showing old data

    @v-xida-msft 

     

    Hi and thank you.  I tried the code and it did produce a blank form.  The problem is that since the 1st record had the varFormType="RepatriationForm" it landed on the 1st screen with the nav links and then quickly went to a blank Repatriation form.  I opened the list in another browser in case there was a cache problem and the same thing happened.

  • v-xida-msft Profile Picture
    on at
    Re: New item is showing old data

    Hi @Misa ,

    Do you create three separated Edit forms within your custom form app?

     

    Based on the formula that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

    OnNew property of SharePointIntegration control:

    Refresh('International Initiation Form');
    If(
     varFormType="International Initiation", 
     NewForm(InternationalInitiationForm);Navigate(InternationalInitiationScreen), 
     varFormType = "US Bound", 
     NewForm(USBoundForm);Navigate(USBoundScreen),
     NewForm(RepatriationForm);Navigate(RepatriationScreen)
    )
    

     

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

     

    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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1