@Uthhra ,
Try This
To add rows to a second gallery based on selected checkboxes and ComboBox values, use this approach:
For the Checkbox OnCheck and OnUncheck properties:
Add the phase to a collection with ComboBox values when checked:
Collect(colSelectedPhases, {Phase: ThisItem.Phase, RelatedItems: ComboBox.SelectedItems})
Remove the phase from the collection when unchecked:
Remove(colSelectedPhases, LookUp(colSelectedPhases, Phase = ThisItem.Phase))
For the ComboBox OnChange property:
Update the related items in colSelectedPhases for the respective phase:
Patch(colSelectedPhases, LookUp(colSelectedPhases, Phase = ThisItem.Phase), {RelatedItems: ComboBox.SelectedItems})
On "+" icon press:
Use nested ForAll to iterate over selected phases and their related items to add to the second gallery:
ForAll(
colSelectedPhases,
ForAll(
RelatedItems,
Collect(
colFinalPhase,
{
ID: Last(colFinalPhase).ID + 1,
'Project Name': prjnames_3.Selected.ProjectName,
Phase: Phase,
'Work Product/Process': 'Work Product/Process' // Replace with actual field
}
)
)
);
_________________________________________________________________________________________________________________________
If my post helped, please mark it as Accept as solution to help others find it. A Thumbs Up would also be appreciated if you found it useful.
Warm regards,
Muhammad Ali