I got this code on my edit item to update a SharePoint list:
Patch(
MySharePointList;
LookUp(
MySharePointList;
ID = GalleryWithTheItems.Selected.ID
);
{
LookUpColumn1: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id: MyvarIDFromTheGalleryWithTheItems.ID;
Value: DropDownWithTheChoiceLookUpColumn1.Selected.Result;
LookUpColumn2: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id: MyvarIDFromTheGalleryWithTheItems.ID;
Value: DropDownWithTheChoiceLookUpColumn2.Selected.Value
}
;ColumnWithText: TextInputUmaLinhaGerenteComercial.Text}
}
)
On my "GalleryWithTheItems" I have this code:
Set(varMode;"Edit");;Set(MyvarIDFromTheGalleryWithTheItems;ThisItem);;Navigate(ScreenToEditItems)
On my dropdown I have this on Items:
Distinct( ListCollection;Title)
And the Value :
Result
On my default:
If(varMode="Edit";GalleryWithTheItems.Selected.LookUpColumn1.Value;"1")
I dont why powerapps dont update the item on SharePoint list.