Hi,
I'm struggling to get the data patch from Gallery to collection.
So I have a container inside the gallery, how do I get all the update in the collection?
ClearCollect(colEvidenceRecord, EvidenceRecordGallery.AllItems)
Hi,
I'm struggling to get the data patch from Gallery to collection.
So I have a container inside the gallery, how do I get all the update in the collection?
ClearCollect(colEvidenceRecord, EvidenceRecordGallery.AllItems)
Does the ClearCollect not give you the items? if you want them all that should in fact work, what error are you getting? I wasn't sure you wanted them all, so I was showing how to patch a single one.
If you want you could do
ForAll(MyGallery.AllItem,
Collect(MyCollection,
{
MyCollectionField1: ThisRecord.Field1,
MyCollectionField2: ThisRecord.Field2,
MyCollectionField3: ThisRecord.Field3
}
)
If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
Hi @FLMike ,
Yes, I have a button outside of the gallery. Inside the gallery there is a container and within the container there is input.
I want to loop through the gallery. Forall function would be appropriate and the gallery should be allitems.
Hi @Spaceballs
So Assume you have a button outside the gallery, the Patch would look like this (of course you have to include your properties etc, this is a template example only)
Patch(MyCollection, MyGalleryName.Selected,
{
CollectionField1: MyGalleryName.Selected.Field1,
CollectionField2: MyGalleryName.Selected.Field2,
CollectionField3: MyGalleryName.Selected.Field3
}
)
If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey
WarrenBelz
146,700
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,015
Most Valuable Professional