cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Patch, Collection, Lookup Dropdown

Hi, 

 

I am trying to create a repeating section. Where every time I enter the values ​​they are saved in a list called 'Projects' I have 1 drop-down menu called 'City' which is a Lookup of another list in sharepoint. In the values ​​I have the following:

Items: The name of the list where the information is found (Lookup)

It displays the values ​​that are But, when I want to patch the information in the other list called 'Projects' no value is added. How can I patch dropdown values ​​in Sharepoint using a collection?

 

Patch(Project, ThisItem, {?????})

 

The same thing happens to me for the Yes or No options, which is a Toogle. Can someone tell me how I can save those values ​​in the collection? 

 

I appreciate the help. 

1 REPLY 1
Highlighted
Microsoft
Microsoft

Hi@SO24,

Based on the issue that you mentioned, do you want to patch a collection to the SP list containing a Lookup column?

Could you please share a bit more about the scenario:

  1. How you create the collection, does it share the same column name with the SP list?
  2. Is there a column in your SP list storing the Toggle value?

If you want to patch a Lookup column in a SP list, you could check the following formula:

Patch(Projects,
         ThisItem,
        {Lookup:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:ThisItem.ID,
                        Value:TextInput1.Text}
              }
         )

Note: Since you use ThisItem, I assume that there is a Gallery. And you use a TextInput to enter to update the SP list.

If you want to patch a Lookup column in a SP list using a collection, you could check the following formula:

Patch(Projects,
         ThisItem,
        {Lookup:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
                        Id:CollectionName[@ID]
                        Value:CollectionName[@ColumnName}
              }
         )

If the above formula could not help you, please provide more details.

Best Regards,

Qi

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,629)