I have a Select All option in a container along with check boxes where some locations are present. I have to choose all the checkboxes and save it in SQL using patch function. I was able to do save the single selection of check boxes and patch it to sql. But I have placed the Select All check box outside the gallery that has locations so Iam unable to use Thisitem.marketing_location.
For single select I use the following code
in Oncheck property to create collection colinput-
Collect(colinput,{region_c:Gallery5.Selected.Value,market_c:ThisItem.Marketing_Location})
Patch function used is -
ForAll(colinput,
Patch(data_source,Defaults(data_source),{region:region_c,market_location:market_c,submitted_by:User().Email,submitted_time:Now(),status:"New"}));Clear(colinput);
The left side region gallery is gallery5. and the right side gallery6.
How to save the values from all check boxes into a collection and patch it to sql?