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 command - workin...
Power Apps
Unanswered

Patch command - working with lookup columns which are site columns

(0) ShareShare
ReportReport
Posted on by

I am working with list A which has a lookup column that is a site column that looks data from a list B that presides in another site (on the same site collection)

 

I am building a PowerApps form to replicate the same functionality as the OTB SharePoint form.  I am able to create a combo box on the form with a data source that points to the other list, B.  However I have created a button which uses the Patch command in the onSelect event where I want to write back the selected value from the combo box to list A.  I get a syntax error stating that the column name does not exist.  I thought it might be the static name so I checked list A and used the static name but still have the error. 

 

Is it possible to work with lookup columns which are site columns (where the list is in another site) and use the Patch command in PowerApps?

Categories:
I have the same question (0)
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi @Anonymous ,

    Yes, Is Possible,

     

    FOr Patch the Lookup column, you need to Patch the data in Sharepoint expected formate like below.
    'Project Name':{
    Id:dd_UNE_ProjectUS.Selected.Id,
    Value: dd_UNE_ProjectUS.Selected.Value,
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
    },

    Thanks,
    Vijay

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay



  • Community Power Platform Member Profile Picture
    on at

    Thanks for replying Vijay,

     

    I have tried a couple of things, firstly re-created the list I'm looking up in the same site.  I created a lookup column on my main list A to the new list.  That worked, then I created a site column looking up the list in the same site, this also worked.  But when ii reference the existing site column, to a list in another site it doesn't recognize the column. 

     

    This is a snippet of my code that doesn't work:

    Available_x0020_Project_x0020_Lo: {
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: ComboBox2.Selected.ID,

     

    It won;t complie erroring saying 'Available_x0020_Project_x0020_Lo:' doesn't exist
    Value: ComboBox2.Selected.Title

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard