so I have a galley which im trying to update items in the SharePoint list based on a dropdown in the gallery .
i get the following error
here is my code from the one im having trouble with .
ForAll(
Gallery1.AllItems,
Patch(DB,ThisRecord
,
{
Status: Dropdown2.SelectedText.Value
}
)
);
I have however used pretty much the same code in another app and that works fine ,
here's the code from the working app
ForAll(
Gallery2_1.AllItems,
Patch(Rooms,ThisRecord
,
{
Admin: ThisRecord.Toggle1.Value,
SLT: ThisRecord.Toggle1_1.Value,
'Office-Admin': ThisRecord.Toggle1_2.Value,
Basic: ThisRecord.Toggle1_3.Value
}
)
);
sorry thought i attached a picture of it
it says
"the specifed record was not found. Server Response: DB failed: Item Not Found " it then included the client request id and the service request id
@daniels471 Is the Data Source for Gallery1 the same as the one in the Patch? Is the Data Type for Status sting in the DB?
ah , forgot that bit , gallery1 is getting its data from another list
@daniels471 , Are you trying to patch the SP Choice status field?
If so you need to update that field in the following way:
ForAll(
Gallery1.AllItems,
Patch(DB,ThisRecord
,
{
Status:{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:Value:Dropdown2.Selected.Id,Value:Dropdown2.Selected.Value}
}
)
);
And you can use the following structure in your Dropdown field's Items property to get the right Id and value on selection:
Choices(DB.Status)
no its just a string colum
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
203 | |
100 | |
61 | |
59 | |
56 |
User | Count |
---|---|
257 | |
162 | |
90 | |
79 | |
70 |