Hi,.
Let's walk this through
1) A checkbox's value is setup by the Default property
which is either
Blank,
Default.Parent
Some Expression you put in, whether its a lookup or filter or whatever.
2) let's say you have your Gallery 1
And you know want Gallery 2 to be filled based on the row you selected in Gallery 1
And, before you save or whatever you are doing, you want them to be able to select another row and fill in either
a) MORE checkboxes and treat them ALL as part of the first rows selection
or
b) you want to track which checkboxes are set for "each row" in Gallery 1
I am going with b) above
1) Create your Gallery for Gallery 1
-Make sure you have whatever the Row ID is from SharePoint, or whatever Unique Identifier you have in some Column in Source 1.
I am going to pretend its an alpha character, A,B,C,D,E etc
2) Now you need a collection. You need some kind of Unique ID for the Check box gallery rows as well. whatever they are
I am going to PRETEND its simply a number 1,2,3,4 whatever
3) We need the following
-The Unique ID of a Row in Gallery 1
-the unique id of the checkbox row
4) Now when someone Checks a CheckBox in Gallery 2 we do this in the OnCheck
Now I could do this with a Collection within a Collection but I made it simple.
Essentially we need to build a Collection that has
1. A property that has the unique ID from Gallery 1
2. A property that has the unique ID from Gallery 2
So let me show you a real-world example now
-I have Gallery1Values
-I have Gallery2Values
-I have Gallery1 Text Label
-1 I have Gallery2CheckBox
My Collection is called CheckedValues.
3.I have a screen and in the OnVisible I have
Clear(CheckedValues).
4. In the OnChecked of Gallery 2, for my Gallery2CheckBox (yes thats its name, sue me ;-) )
//this will add the currently selected Gallery 1
// with the currently checked gallery 2 checkbox values
Collect(CheckedValues,
{
Gallery1Value: Gallery1Values.Selected.Gallery1LabelValue.Text,
CheckBoxValue: Gallery2Values.Selected.Gallery2CheckBox.Text
}
)
5. In my OnUncheck of Gallery 2 for the Gallery2CheckBox I have
//This removes the CheckBox record so that it will NOT show
// up as checked for the selected Gallery 1 record any more
Remove(CheckedValues,
LookUp(CheckedValues,
CheckBoxValue = Gallery2Values.Selected.Gallery2CheckBox.Text
And Gallery1Value = Gallery1Values.Selected.Gallery1LabelValue.Text)
)
6. In my Default I have
// This will make it checked if the gallery 1
// and gallery 2 are in the Collection
!IsBlank(LookUp(CheckedValues, Self.Text = CheckBoxValue
And Gallery1Value = Gallery1Values.Selected.Gallery1LabelValue.Text)
)
Now I will show an example, where I will select 1-4 for A, and 2-3 for B and 1 and 4 for C
Nothing at first
Then I select for all I said above. Then I will swap back and forth so you know I changed rows after my selections
So the pictures represent me moving from row to row and it checks or unchecks what I picked for A,B,C Gallery 1
And Done
Now if you want to patch them and stuff please open another question as this answers what you wanted and was work to do.