web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch LookUp Columns w...
Power Apps
Unanswered

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

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard