
Announcements
I am creating a collection in which I need to capture the unique identifier (column1) for each record collected. In this case, column1 is based on the unqiue combinations of color and item number. I am currently building the collection using:
Collect(MyCollection,
{Quantity: Enter_qty.Text,
Column1: First(Distinct(Filter(Filter(Filter(DataTable, RM_item_number = ItemNumber.Text), RM_vendor_name = SelectVendor.Selected.Result), RM_color = Color_Label.Text), Column1))})
I am running into issues with my Column1 field. Instead of collecting the referenced value, a table (of one value) is created. I am trying to patch this collection into my dataset, so I need this field to match with the Column1 value in my data set. Is there a way to convert this single record to a value, or collect a value rather than a table? Any guidance here would be very appreciated! Thanks.
Solved my own problem here - if anyone else runs into the same issue, it can be avoided by adding .Result to the end of the record reference. The correct code is as follows
Collect(POs, {Quantity: Enter_qty.Text,
Column1: First(Distinct(Filter(Filter(Filter(DataTable, RM_item_number = ItemNumber.Text), RM_vendor_name = SelectVendor.Selected.Result), RM_color = Title5.Text), Column1)).Result})