cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Highlighted
Frequent Visitor

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,834)