cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
larivibi
Level: Powered On

Patch lookup field containing multiple items

Hello,

I am trying to patch a record that has a lookup field containing multiple items.

So far I have been able to Patch one single (selected) item into the field by using the following Patch :

 

Patch(TheList;Defaults(TheList);
    {ItemsEmpruntes:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
                        Id:BrowseGallery1.Selected.ID;
                        Value:BrowseGallery1.Selected.Title}
    })

 

The problem arises when I try to change "BrowseGallery1.Selected.ID" to "BrowseGallery1.AllItems.ID"

I understand AllItems.ID is not a good solution. PowerApps sends me en arror message the looks like this (doing my best to translate a french error message...) :

"Invalid argument type. Record Value expected, but with a different schema.

Array type is not valid for ID column. Expected type is Number.

I am now searching for a way to make it work."

 

What would be the correct wat to patch a multiple values inside a single field of a lookup column ?

blanco12
Level: Power Up

Re: Patch lookup field containing multiple items

Becoming a big fan of your ability to present complex ideas simply. PowerApps is easy, just not simple.Tutuapp 9Apps Showbox Best.