Notifications
Announcements
Background:
I'm building a Power App that integrates with two SharePoint lists for managing expense claims and invoices. Here’s an overview of the workflow:
SharePoint List 1 (Expense Claim Automation): This list stores basic user information. On the app's initial screen, users fill in this basic information, and when they click on the "Create Invoice" button, the data is submitted to SharePoint List 1. Submitting this form first ensures that the SharePoint ID is generated automatically.
SharePoint List 2 (Invoice Master): After submitting the basic information, users are redirected to an invoice screen where they can input more detailed information. When they finish, they click "Save," and this data is supposed to be submitted to SharePoint List 2.
Issue:
Currently, the detailed information from the invoice screen (SharePoint List 2) is not updating correctly. For example, when User A (ID=1) completes and submits an invoice, their data is saved correctly. However, when User B (ID=2) submits their invoice, instead of creating or updating their unique entry in SharePoint List 2, it overwrites or reuses the data associated with User A’s ID.
This means new user entries are not correctly saved in SharePoint List 2 and are instead referencing the previous user’s data, leading to data inaccuracies.
Request:
Could you assist in troubleshooting why the SharePoint List 2 submission does not capture the new user's data and instead references previous submissions? I'm aiming to ensure that each user's submission in SharePoint List 2 reflects their individual information based on their unique ID from SharePoint List 1
UpdateContext({SaveButtonPressed: true}); Set( ChangeNumberVar, Text( Value(DataCardValue22.Text), "[$-en-GB]$#,###.00" ) ); SubmitForm(Form5); Set( showFormButtons, false ); Patch( [@'Invoice Master'], Defaults('Invoice Master'), { 'Request ID': DataCardValue10.Text, 'Change Number': ChangeNumberVar } ); Patch( [@'Expense Claim Automation'], LookUp( 'Expense Claim Automation', Text(ID) = DataCardValue10.Text ), { 'Total Amount:': Sum( Filter( Gallery3.AllItems, 'Request ID' = Text(Gallery2.Selected.ID) ), Amount ) } )
UpdateContext({ SaveButtonPressed: true }); Set(ChangeNumberVar, Text(Value(DataCardValue22.Text), "[$-en-GB]$#,###.00")); SubmitForm(Form5); If( Form5.Valid, With( { requestID: DataCardValue10.Text }, Patch( [@'Invoice Master'], Defaults('Invoice Master'), Form5.Updates, { 'Request ID': requestID, 'Amount': ChangeNumberVar } ), Patch( [@'Expense Claim Automation'], LookUp('Expense Claim Automation', Text(ID) = requestID), { 'Total Amount:': Sum( Filter( Gallery3.AllItems, 'Request ID' = Text(Gallery2.Selected.ID) ), Amount ) } ) ) );
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 717 Most Valuable Professional
Michael E. Gernaey 329 Super User 2025 Season 2
Power Platform 1919 268