cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
corinmurphy
Level: Powered On

Converting a single record to a value

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.

1 ACCEPTED SOLUTION

Accepted Solutions
corinmurphy
Level: Powered On

Re: Converting a single record to a value

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})

View solution in original post

1 REPLY 1
corinmurphy
Level: Powered On

Re: Converting a single record to a value

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})

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,344)