
Announcements
Hello, I am needing help sending a collection of items to a SharePoint list.
I am pulling in the data from SharePoint List 1. Then I am having the associate select from the list what they would like and their selections go into a collection. I am then wanting to take the items in the collection, plus a number input attached to each line of the collection and create a new line item for each entry in a Sharepoint List
So far this is what I've come up with but it's not working.
ForAll(
'Gall1'.AllItems,
Patch(
SharepointList,
Defaults(SharePointList),
(Venue:ThisRecord.Item.Venue,'Date':ThisRecord.Item.Date,'Sport':ThisRecord.Item.Sport,'Tickets':Sumtix.text)
Your ForAll is backward! You are trying to use it like a ForLoop in some development language - which PowerApps is not. It is a function that returns a table of records based on your iteration table and record schema.
It is more efficient to use the function as intended and will provide better performance - especially when trying to Patch!
Patch(SharepointList,
ForAll('Gall1'.AllItems,
{Venue: Venue,
'Date': Date,
'Sport': Sport,
'Tickets': Sumtix.text
}
)
)
The above will create records in your list with the value from the Gallery.
I hope this is helpful for you.