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 LookUp Columns w...
Power Apps
Answered

Patch LookUp Columns with ID selection

(0) ShareShare
ReportReport
Posted on by 92

Hi All

I try to Use Patch for LookUp In my power app

My SP List is 'Store Inventory' Column is StatusCode with LookUp Tow Choices (On Hold and Done).

I use Patch as below but it is working Only with first Item In my list even i used with another filed but the changing Happened with the first filed that his ID = 1

 

Patch(Store Inventory
LookUp(Store Inventory, ID= 1)
, {
StatusCode: {Value: "On Hold"}
}
)

regards

Categories:
I have the same question (0)
  • maheralkhalil Profile Picture
    92 on at

    for button i use 

    Patch( 'Store Inventory',
    LookUp('Store Inventory', ID=1),
    {
    StatusCode:Dropdown2.Selected
    }
    )

  • v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @maheralkhalil ,

     

    It only works for the first record in the list because you specify that the record to be modified is always the one with ID 1.

    https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-patch#modify-or-create-a-record-in-a-data-source-1

    vyujincuimsft_1-1655190774973.png

    Maybe you could try as below:

    Patch(Store Inventory
    LookUp(Store Inventory, ID= 2),
    {...........}
    )

    or

    Patch(Store Inventory
    LookUp(Store Inventory, ID= Gallery1.Selected.ID),
    {...........}
    )

     

     

    Best Regards,

    Charlie Choi

  • maheralkhalil Profile Picture
    92 on at

    Hi @v-yujincui-msft 

    thx for your replay

    it was try with ID= 2 but that not working

    with secound option Also not working

    regards

     

  • Verified answer
    v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @maheralkhalil ,

     

    Do you want to patch a SharePoint Lookup column?

    I have made a test for your reference.

     

    1. Here are my lists.

    vyujincuimsft_0-1655262753321.png

    2. Here are my App.

    vyujincuimsft_1-1655263178189.png

    Result
    patch.gif

     

    In addition, here is a link that for your reference.

    https://www.matthewdevaney.com/power-apps-patch-function-examples-for-every-sharepoint-column-type/patch-a-sharepoint-lookup-column-in-power-apps/

     

     

     

    Best Regards,
    Charlie Choi

  • maheralkhalil Profile Picture
    92 on at

    Hi @v-yujincui-msft 

    I use in SP list Task Outcome Column for Choices not lookaup Column but I use same patch 

    Regards 

  • maheralkhalil Profile Picture
    92 on at

    hi @v-yujincui-msft 

    it's working now as what you do on Up

    thank you 

    I think I was used wrrong patch

    now OK

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 385

#2
Vish WR Profile Picture

Vish WR 367

#3
timl Profile Picture

timl 340 Super User 2026 Season 1

Last 30 days Overall leaderboard