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 / Patch function for cre...
Power Apps
Suggested Answer

Patch function for creating items at Sharpoint with lookUp Columns ins returning nothing.

(1) ShareShare
ReportReport
Posted on by 21
Hi everyone,

I'm working on a SharePoint app where I need to mass upload data from one list (List B) into another SharePoint list (List A).
The challenge I'm facing is that List A has two lookup columns, while the corresponding data in List B is in text format. 
 
To give some context:
- List A is the target list where the data will be stored.
- List B is the source list containing text fields for "Customer Code" and "Product Code."
- I need to map these text fields from List B to the lookup fields in List A.
There are 1,047 records to transfer, so theoretically, it could be a simple copy-paste job, but I know that's not possible in SharePoint. 
In summary, my goal is to match and transfer the "Customer Code" and "Product Code" from List B into the corresponding lookup columns in List A, which will serve as the database for my app.
 
Let me know if you need more details or adjustments!
My current code
 
ForAll(
    Patch(
        SalesAPP_Oportunidades;
        Defaults(SalesAPP_Oportunidades);
        {
            Company: ThisRecord.Company;
            DeliveryDate: ThisRecord.Date_C;
            Stage: {Value: ThisRecord.Status};
            Volume: Value(ThisRecord.'Soma de Units');
            SalesPrice: Value(ThisRecord.'USD Net Price');
            UFCustormer: ThisRecord.UF;
            CustomerListCode: {
                Id:ThisRecord.ID_Cliente;
                Value: ThisRecord.SAP_Customer
            };
            ProductListCode: {
                Id: ThisRecord.ID_produto;
                Value: ThisRecord.SAP_Product
            }
        }
    )
)
 
Thank you so much!
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at
    Hi,
     
    You show us trying to do a lookup but what property were you even trying to map that too?
     
    Your details are disjointed.
     
    Explain what you are trying to patch, the Data types for each and then show us the error.
     
    If you want to patch a lookup, then you need to pass it a record in that place, I don't see you doing that anywhere and the lookup is confusing, and btw there is no reasons you cannot use ThisRecord in a lookever, but again you aren't showing all your code, share more.
  • Suggested answer
    gpcamillo Profile Picture
    21 on at
    Hi,
     
    You show us trying to do a lookup but what property were you even trying to map that too?
     
    Your details are disjointed. 
    Sorry about that
     
    Explain what you are trying to patch, the Data types for each and then show us the error.
    I'm trying to Patch 2 Text Columns to 2 LookUp Columns at sharepoint, making 2 filters (customer code and company name)
    My table have 1047 items.

     
    If you want to patch a lookup, then you need to pass it a record in that place , I don't see you doing that anywhere and the lookup is confusing, and btw there is no reasons you cannot use ThisRecord in a lookever, but again you aren't showing all your code, share more.
    Thank you for the information. Did you have some good exemple to share?
  • gpcamillo Profile Picture
    21 on at
    FLMike, thank you. 
    See if the post is better to understand now, please?

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard