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 :
Power Platform Community / Forums / Power Apps / Patch function for cre...
Power Apps
Unanswered

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!
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    52,972 Super User 2025 Season 2 on at
    Patch function for creating items at Sharpoint with lookUp Columns ins returning nothing.
    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
    Patch function for creating items at Sharpoint with lookUp Columns ins returning nothing.
    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
    Patch function for creating items at Sharpoint with lookUp Columns ins returning nothing.
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard