Hi all,
I am creating a collection, collectionA, to consist of the records in a Gallery when a Checkbox is Checked by the following expression:
ForAll(
'Options-gal'.AllItems,
If(
'Options-gal-checkbox'.Value = true,
Collect(
colOptionsSelected,
ThisRecord
);
I want to add two columns to this collection, alongside the record that is collected. The columns can be named ColumnA and ColumnB for this example. The purpose is that these columns will have a value of 0 at this time, and they will be patched with another value later in the App.
In other words, let's say there were three items in the gallery. Only two of them, records 1 and 2, had the checkbox checked. collectionA should consist of two records. The records should have two extra columns, ColumnA and ColumnB, both with a value of 0.
I have tried 'AddColumns' but cannot get it to work, either there's an error in the PowerFX, or, no error but when I examine the Collection it has not added the Columns.
I remember having to do this before in an App a couple of years ago and it was very frustrating then; I can't recall how I fixed it and to avoid wasting more time on this, could anyone assist with the relevant solution?
Many thanks!