web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : Qgsx74NgqAyWXHbA5oYiXI
Power Apps - Building Power Apps
Answered

New item is showing old data

Like (0) ShareShare
ReportReport
Posted on 12 Mar 2020 23:53:17 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:
I have the same question (0)
  • v-xida-msft Profile Picture
    on 13 Mar 2020 at 10:19:14
    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,

  • Misa Profile Picture
    248 on 13 Mar 2020 at 15:22:28
    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.

  • Verified answer
    v-xida-msft Profile Picture
    on 16 Mar 2020 at 01:54:15
    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 19 Mar 2020 at 06:04:27
    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.

  • v-xida-msft Profile Picture
    on 19 Mar 2020 at 06:08:17
    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard
Loading complete