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 / Inserting data into a ...
Power Apps
Answered

Inserting data into a lookup Field via patch

(0) ShareShare
ReportReport
Posted on by 4

Hello to all.

 

I'm building an app, which is linked to sharepoint.

 

The application is linked to a sharepoint list with the name: PGMM_Mentee.

In this sharepoint there is a lookup field, Hard_Skills_Souhaité, that connects to another table, PGMM_Hard_Skills.

 

I am trying to use a patch, to insert values that i select, but i keep getting errors. 

The patch i created so far is with values hard coded, which later on i'll change to values that i get from a collection.

So far this is the patch i made by checking out the forum and other tutorials.

 

Patch(
      PGMM_Mentee;
      LookUp(PGMM_Mentee; ID=7);
{
     Hard_Skills_Souhaité: {
          Id: 2;
          Value: "PHP";
     }
}
)

The error that i get is that it is expecting a table at the place of Hard_Skills_Souhaité, which is the lookup field in the PGMM_Mentee table.

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @TomasSpit ,

     

    You can use LookUp function to get the specific item from Items of the Combo box, based on a selected value:

    Patch(
     PGMM_Mentee;
     LookUp(PGMM_Mentee; ID=7);
     {
     Hard_Skills_Souhaité: LookUp(Choices(PGMM_Mentee.Hard_Skills_Souhaité); Value = collection.Selected.Hard_Skill)
     }
    )

     

    Best regards,

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard