Hi all,
I have two galleries(first one is Phase gallery and the second one is final Phase gallery). When the checkbox is clicked in the first gallery it will add rows in the second gallery based on the count of items in the work product(For e.g. when the checkbox near the "Design" is selected in the first gallery and the work product (combo box) is having 4 items, 4 rows will be added in the second gallery below). I have a requirement when the user clicks on the checkbox in the First Phase gallery rows will be added. When user uncheck the checkbox before saving it must clear the added rows from the second gallery below.
In the second gallery (for design if it has 4 rows and when user deletes all the 4 rows for the design phase by checking the checkbox in the second gallery it must also uncheck the checkbox in the first Phase gallery, and when only 2 is deleted of 4 rows it must not uncheck the checkbox in the first Phase gallery).
the code for the first gallery phase(oncheck of the checkbox).
Set(countitems,0); //this is the variable set to count items for work product.
Set(countitems,Sum(Count Rows(ComboBox6_5.Selected Items),count items)); //this count the items in work product based on the checkbox checked for each phase.
ForAll(Sequence(count items) As SequenceNumber, // this add rows based on the checkbox selected in the second gallery.
Collect(
colFinalPhase, //colFinalPhase is the collection used in the items property of the second below gallery.
{
ID: Last(colFinalPhase).ID + 1,
'Phase ID': varNewPhase,
'Project Name': prjnames_3.Selected.ProjectName,
Phase: Title2_4.Text,
'Work Product/Process': Last(
FirstN(
ComboBox6_5.Selected Items,
SequenceNumber.Value
)
).'Work Product/Process'
}
)
);
Any help/suggestion on this?