I have a collection from a sharepoint list. I also have a gallery with items from the collection so whenever I patched/add new item/s to the collection, it'll automatically reflect to the gallery adding new rows. How do I patched all the items in the gallery including the old ones to the Sharepoint list? I tried doing the one below but won't work because new items have blank col IDs. Still fairly new to PowerApps so any help or workaround is appreciated.
ForAll(
RenameColumns(
price_gal.AllItems,
"ID",
"IDD"
),
Patch(
MainList,
LookUp(
Filter(
colPrice,
'Item No.' = _Selected.'Item No.'
),
ID = IDD
),{...}))
Hi @rzainm ,
How is the situation? Have you solved your problem?
If you find my answer helpful, you can accept it as a solution to help more people trapped in this problem.
Best regards,
Rimmon Li
Hi @rzainm ,
Do you want to patch all the items in the gallery including the old ones to the SharePoint list? In SP, the ID column is automatically generated and cannot be modified, I recommend that you set a column with no duplicate value to mark each record, such as the Title column. Maybe you can try this:
ForAll(Gallery.AllItems As C, If(!isBlank(LookUp(List,Title=C.Title)),Patch(List,LookUp(List,Title=C.Title),C),Patch(List,Defaults(List),C)))
Best regards,
Rimmon Li