I am not able to use this while updating my sharepoint choice column from powerapp: '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
Patch('INVENTORY LIST',{trialstatus:{Value:"ok1",'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})
Solved! Go to Solution.
Hi @urvashi19 ,
Check https://youtu.be/g9ChYuTdNd4
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
Hi@urvashi19,
Based on the issue that you mentioned, do you want to update the status within the Gallery selected record?
Could you please share a bit more about the scenario?
Have seen the error message you provided, I think you should refresh your data source before you trigger the Patch() formula.
Please modify you formula as below:
Select(Parent);
Refresh('Hotel Inventry'); // Add this Refresh before the Patch()
Patch(
'Hotel Inventry',
Gallery1.Selected,
{Status: {Value: "Assigned"}}
)
Hope it could help.
Regards,
Qi
Hi @urvashi19 ,
Check https://youtu.be/g9ChYuTdNd4
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
You're going to need to specify the Record that you want to patch in your Patch formula.
You no longer need to specify the odata.type in the formula, but you DO need to tell it what record to change in your data source.
Patch('INVENTORY LIST', whatRecord?, {trialstatus:{Value:"ok1"}})
Now, if you are just updating the status, then you might want to consider and UpdateIf instead:
UpdateIf('INVENTORY LIST', ID=someID, {trialstatus: {Value:"ok1"}})
But either way...you must supply what you want to patch/update.
I hope this is helpful for you.
Can you please help me with this one.
UpdateIf('Hotel Inventory', ID=ThisItem.ID, {Status: {Value:"assigned"}})
Also do a refresh on your datasource in the designer at this point just to make sure your data has the proper etags.
Hi@urvashi19,
Based on the issue that you mentioned, do you want to update the status within the Gallery selected record?
Could you please share a bit more about the scenario?
Have seen the error message you provided, I think you should refresh your data source before you trigger the Patch() formula.
Please modify you formula as below:
Select(Parent);
Refresh('Hotel Inventry'); // Add this Refresh before the Patch()
Patch(
'Hotel Inventry',
Gallery1.Selected,
{Status: {Value: "Assigned"}}
)
Hope it could help.
Regards,
Qi