Hello,
I have a SharePoint list, and a Collection from it. And I'm patching both the collection and SharePoint list (for UI performance feel).
For some reason, the "Reason" column is updating on the SharePoint List, but not on the Collection. (While the Status is updating on both ways)
Collection patch:
Patch(
recordsList,
selectedCall,
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
SharePoint List patch:
Patch(
'Calls List',
selectedCall,
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
Is there any way to troubleshoot this? I have tried putting a string instead of Dropdown1.SelectedText.Value, it worked once, then it stopped working.
Solved! Go to Solution.
Hi @Sababneh ,
I assume SelectedCall is a something selected in a gallery and set as as Variable?
Two things your might try here - if that data set contains an identifier such as an ID
Patch(
'Calls List',
{ID:selectedCall.ID},
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
or
UpdateIf(
'Calls List',
ID=selectedCall.ID,
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Sababneh ,
I assume SelectedCall is a something selected in a gallery and set as as Variable?
Two things your might try here - if that data set contains an identifier such as an ID
Patch(
'Calls List',
{ID:selectedCall.ID},
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
or
UpdateIf(
'Calls List',
ID=selectedCall.ID,
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hello @WarrenBelz
Thanks for the reply.
This code is working perfectly:
UpdateIf(
recordsList,
ID = selectedCall.ID,
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
But this is not working for the collection:
Patch(
recordsList,
{ID:selectedCall.ID},
{
Status: "Failed",
Reason: Dropdown1.SelectedText.Value
}
)
Should I change all formulas from Patch to UpdateIf? Is it safer?
Hi @Sababneh ,
There is a known bug in Patch for updating records writing to fields that are blank, not sure if it is fixed, but I use UpdateIf for all updating and Patch (or Collect where possible) for new records and have never had an issue (which is why I gave you the option).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
139 | |
96 | |
83 |