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 a new reconrd to...
Power Apps
Answered

Patch a new reconrd to a SharePoint List with a Field from A Text Input and a Lookup Field

(0) ShareShare
ReportReport
Posted on by 42

Hello everybody. 

Patch(
 testProjekt_Lokal; 
 Defaults(testProjekt_Lokal);
 { 
 Projekt_Name: TextInput1.Text;
 KundeID: 
 LookUp(
 testKunde_Lokal; Kunde_ID = ComboBox2.Selected.Kunde_ID)
 }
)

 

 

Trying to patch with a button the text content from a Input Field (TextInput1.Text) and the selected value in a combo box (ComboBox2.Selected.Kunde_ID). Those values are called in the SharePoint List respectively "Projekt_Name:" and "KundeID". KundeID is a LookUp Field. 

 

Now I have no clue why this is not working. Three error messages so far:

RPowerAutomated_0-1700488487961.png

 

That means: 

1) Invalid argument type. Expecting a record value, but of a different schema.

 

??? testProjekt_Lokal has only optional values and I am patching those values:

RPowerAutomated_1-1700488681010.png

It makes no sense at all. 

 

2) Error message regarding missing column

3) Invalid arguments for PATCH. 

 

 

I have no clue, can somebody help?

Categories:
I have the same question (0)
  • jorge.daniel Profile Picture
    1,430 Super User 2024 Season 1 on at

    Hi,

     

    This LookUp( testKunde_Lokal; Kunde_ID = ComboBox2.Selected.Kunde_ID) looks good but power apps doesn´t like it.

     

    Usually, putting things in a label helps in getting additional hints on what may be wrong.

  • dukatz Profile Picture
    165 on at

    To Patch al LookUp field you need to pacth the ID and the value of the LookUp. You're only patching the ID once. here is an example PATCH A SharePoint LookUp Column In Power Apps - Matthew Devaney

     

  • RPowerAutomated Profile Picture
    42 on at

    The Example has to have two values, one for ID and nome for the Value. But I Only need the ID from "Kunden" in my Projekt list. 

    The example dosent help at all, since the id is hardcoded there (2) but I want to retrieve it from a combobox selection. 

  • RPowerAutomated Profile Picture
    42 on at

    If I add a last Argument to my lookup it will work and give the selected ID back: 

    RPowerAutomated_0-1700490236211.png

     

    Still the Patch Function wont work. 

  • Verified answer
    RPowerAutomated Profile Picture
    42 on at

    This worked for me: 

     

    Patch(
     testProjekt_Lokal; 
     Defaults(testProjekt_Lokal);
     { 
     Projekt_Name: TextInput1.Text;
     KundeID: {
     Id: ComboBox2.Selected.Kunde_ID;
     Value: LookUp(testKunde_Lokal; Kunde_ID = ComboBox2.Selected.Kunde_ID; Kunde_ID)
     }
     }
    )

     

    Basically split the Lookup Field in the Child Table in Id and Value. They are both necessary. 
    Thanks @dukatz for the Link.

  • dukatz Profile Picture
    165 on at

    ID is internal for Power Apps to know which field your referencing, Value is the Value that is shown inside the List (if I'm not mistaking). Just use your ID for both Value and ID. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 94

#2
WarrenBelz Profile Picture

WarrenBelz 82 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard