Hi @Appy1 ,
This is kinda tricky but let's try...
Assuming Gallery 1 is your 1st Gallery and Gallery1_1 is your nested gallery
What you need to do is, Patch your 2nd Gallery (Gallery1_1) in such a way that it is linked to the record of 1st Gallery
To have better control of the records when saving:
Use collection
When you make changes in the data in 2nd Gallery (Gallery1_1), capture edited data in collection
If(
ThisItem.'Primary Key of 1st Gallery's datasource' in ColCaptureDetails.UniqueID_2ndGallery,
Update(
ColCaptureDetails,
LookUp(
ColCaptureDetails,
UniqueID_2ndGallery = ThisItem.'Primary Key of 1st Gallery's datasource'
),
{
UniqueID_2ndGallery: ThisItem.'Primary Key of 1st Gallery's datasource',
Record_1stGalleryLookUp: Gallery1.Selected,
//...other fields from Gallery1_1
}
),
Collect(
ColCaptureDetails,
{
UniqueID_2ndGallery: ThisItem.'Primary Key of 1st Gallery's datasource',
Record_1stGalleryLookUp: Gallery1.Selected,
//...other fields from Gallery1_1
}
)
)
So here's your collection
When you are patching Records -> Make sure you patch the following:
ForAll(
ColCaptureDetails,
With(
{
CurrentRecord_2ndGallery: ThisRecord
},
Patch(
(datasource_of_2ndGallery),
LookUp(datasource_of_2ndGallery, UniqueID_2ndGallery = CurrentRecord_2ndGallery.UniqueID_2ndGallery, ThisRecord),
{
LookUp_1stGallery: CurrentRecord_2ndGallery.Record_1stGalleryLookUp,
UniqueID: CurrentRecord_2ndGallery.UniqueID_2ndGallery,
//..... all fields
}
)
)
)
I hope this works and helps you