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 / SharePoint lookup colu...
Power Apps
Unanswered

SharePoint lookup column patch not working for new records

(1) ShareShare
ReportReport
Posted on by 23

Hello

I currently have this code in the OnSucess field of a SharePoint form. My SP lookup column updates fine for existing records, but for new records, I have to resubmit the form before the lookup column gets populated. Is there a workaround for this issue?

Patch(
 'Engagement Summaries',
 SharePointForm1.LastSubmit, // Reference to the item that was just submitted
 {
 'Salesforce Engagement': {
 '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
 Id: DataCardValue6.Selected.ID, // ID of the selected item from Salesforce Projects
 Value: DataCardValue6.Selected.'ID+Name' // Display value of the selected item
 }
 }
);
ResetForm(Self);
RequestHide();

 

Categories:
  • EddieE Profile Picture
    4,650 Moderator on at

    @jauntysever 

    Integrated forms have some weird behaviours when compared to Canvas apps, and not all are that obvious.

    eg. https://powerusers.microsoft.com/t5/Building-Power-Apps/FormSubmit-with-Sharepoint-integration-does-now-show-created-in/td-p/2022007

    I suspect this bit of code falls into this category

    SharePointForm1.LastSubmit

     

    If there's a reason why you cannot include that code as part of the New form submit then I'd be looking at Power Automate to add this when a New item is created in the list

     

     

  • Kellboy2243 Profile Picture
    51 on at

    Hi @jauntysever

     

    Issue Summary:

     

    You're encountering a problem with a SharePoint lookup column in a PowerApps form. While the lookup column updates correctly for existing records, new records require a resubmission before the lookup column is populated. You need a workaround to avoid the need for resubmission.

     

    Potential Solution:

     

    This issue often occurs because the form submission and the patching of the lookup column might be happening too quickly, causing the lookup column not to get populated on the first try. To ensure the lookup column is populated correctly, you can use a combination of SubmitForm and Patch with proper timing.

     

    consider introducing a slight delay using a Timer control between form submission and patching. if you need help in implementing this, let me know and i will share you a step by step guide on how to do this.

  • jauntysever Profile Picture
    23 on at

    Hi @Kellboy2243 - if you could please share that guide, that would be amazing 😀

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard