
I am creating an app where users will be able to update SharePoint list scores. The first screen of the app is the form where users can input scores, which then gets sent to a collection called colResults. On the review screen, a gallery pulls in colResults where users can then make updates to any scores they made before submitting to the SharePoint list. I'm having an issue writing the code to submit the updates to the SharePoint list. Since we're not adding new rows, just changing scores of what's already existing, a LookUp function is needed to see exactly which row the scores should be updated. Building and Room are the two columns that will distinguish what is changed. Exterior, Interior, and Seats are the scores. I have attached a sample of my code. I keep getting errors of "Error when trying to retrieve data from the network fetching items failed" Could anyone help? Thank you!
ForAll(colResults As List, Patch('Score Results', LookUp('Score Results', Building= List.Building && Room = List.Room), {Exterior: ThisRecord.Exterior, Interior: ThisRecord.Interior, Seats: ThisRecord.Seats}))
Hi @tdhuff0803 ,
There is nothing fundamentally wrong with what you have, however I will give you a different approach to try
Patch(
'Score Results',
ForAll(
colResults As List,
With(
{
_ID:
LookUp(
'Score Results',
Building = List.Building &&
Room = List.Room
).ID
},
{
ID: _ID,
Exterior: List.Exterior,
Interior: List.Interior,
Seats: List.Seats
}
)
)
)
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.
MVP (Business Applications) Visit my blog Practical Power Apps