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 / Need to Update Share p...
Power Apps
Unanswered

Need to Update Share point List - Lookup Column using Patch in

(0) ShareShare
ReportReport
Posted on by 12

Hi ,

 

I Have two lists Employees And Cities. There s A Lookup Column City in Employees which looks upto Column City in Cities.

 

On the Click of Update in Application . The Vlaue in the Tetx Box Near to The update should Update the DropDown Column City which is a lookup Column . Please let me know how the Patch Function should be Written . 

Employees.PNG
Cities.PNG
App.PNG
Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @SushReus 

     

    Try using the below expression:
    Patch(Employees, LookUp(Employees,Title = TextInput4.Text),
    {
        City:{Id: LookUp(Cities,Title = TextInput9.Text).ID,Value:LookUp(Cities,Title = TextInput9.Text).Title}
    })
    Here, I have created a similar scenario to patch the updates.
    TextInput4 holds the employee Name, TextInput9 is the textbox beside Submit button to hold the new Value. 
    As per my Employees SP list, I have stored Names in the title, so if you want to match with some other column, please update the column name in lookup query. 
    MicrosoftTeams-image (106).png

    Hope this Helps!

     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • v-yuxima-msft Profile Picture
    Microsoft Employee on at

    Hi @SushReus 

     

    Could you please test with @yashag2255 's suggestion?

    Is it solve your issue?

     

    Best Regards.

    Yumia

  • SushReus Profile Picture
    12 on at

    The City Column in Share point List . Is it a look up column - Drop Down ? 

     

    There is no error in the Function But after I Click on Update . There s nothing Updated in Share point List.


    @yashag2255 wrote:

    Hi @SushReus 

     

    Try using the below expression:
    Patch(Employees, LookUp(Employees,Title = TextInput4.Text),
    {
        City:{Id: LookUp(Cities,Title = TextInput9.Text).ID,Value:LookUp(Cities,Title = TextInput9.Text).Title}
    })
    Here, I have created a similar scenario to patch the updates.
    TextInput4 holds the employee Name, TextInput9 is the textbox beside Submit button to hold the new Value. 
    As per my Employees SP list, I have stored Names in the title, so if you want to match with some other column, please update the column name in lookup query. 
    MicrosoftTeams-image (106).png

    Hope this Helps!

     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you l
     
     

     


     

  • SushReus Profile Picture
    12 on at

    Hi Yuxima,

     

    It is not yet resolved can you please help me out.


    @v-yuxima-msft wrote:

    Hi @SushReus 

     

    Could you please test with @yashag2255 's suggestion?

    Is it solve your issue?

     

    Best Regards.

    Yumia


     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @SushReus 

     

    Yes, City is a column of type choices.
     
    Please share details about your SP list and the type of column, through this we will be able to help you better.
     
     
  • SushReus Profile Picture
    12 on at

    Hi Yash,

     

    The CIty Column in Employees SP List is a lookup column which is from another SP List Cities . 

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    HI @SushReus 

     

    Please share the formula for OnSelect property of your button. I tried the same scenario as yours and it was updating successfully, so might be possible it is some minor formula level mistake.
  • SushReus Profile Picture
    12 on at

    Patch(Employees, LookUp(Employees,Title = TextInput1.Text),
    {
    City:{Id: LookUp(Cities,Title = TextCol.Text).ID,Value:LookUp(Cities,Title = TextCol.Text).Title}
    })

     

    and 

     

    Patch( Employees , ThisItem , { Title : TextInput1.Text , Colour : Dropdown1.Selected , Department : TextDept.Text , Dist : TextColor.Text, Town : TextCol.Text })

     

     

  • SushReus Profile Picture
    12 on at

    I would Require another Help 

     

    Need to Update a look up column for the below given Scenario

     

    I want to Update my SharePoint List HELP DESK (Column - Category which is a look up column)  using Patch with the Detail I give in Category Text Box whose value is dependent on Drop Down ddCategoryType . (Have a look at the screenshots)

     

    Drop Down ddCategoryType is populated from SharePoint List CategoryOptions 

     

    HelpDeskSPList.png

    App_Categort_Txt.png
    CategoryOptionsSPList.png
    App_Category_ddl.png

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 294 Most Valuable Professional

#2
11manish Profile Picture

11manish 210

#3
Valantis Profile Picture

Valantis 169

Last 30 days Overall leaderboard