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

Collect specific record

Hello All,

 

I am trying to do what I was hoping would be simple, which is to add a specific data source record to a collection.

With that said, is there a way to grab an entire specific record and add it to a collection?

 

Any help would be appreciated.

Thank you,

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Edwin-Abdalian
Level 10

Re: Collect specific record

yes, absolutely. 

if you want to get one specific record into a collection, use lookup on your datasource to get only 1 record

ClearCollect(ColYourRecord, Lookup('YourDataSource', condition such as ID= Textbox1.Text))

This will return only 1 record.

 

if you want to get records that match a certain criteria and then insert them into a collection, use Filter on your datasource to get only those records

ClearCollect(ColYourRecord, Filter('YourDataSource', condition such as ID= Textbox1.Text))

this will return all the records that have ID= Textbox1.Text

--------------------------------------------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

View solution in original post

3 REPLIES 3
Highlighted
Edwin-Abdalian
Level 10

Re: Collect specific record

yes, absolutely. 

if you want to get one specific record into a collection, use lookup on your datasource to get only 1 record

ClearCollect(ColYourRecord, Lookup('YourDataSource', condition such as ID= Textbox1.Text))

This will return only 1 record.

 

if you want to get records that match a certain criteria and then insert them into a collection, use Filter on your datasource to get only those records

ClearCollect(ColYourRecord, Filter('YourDataSource', condition such as ID= Textbox1.Text))

this will return all the records that have ID= Textbox1.Text

--------------------------------------------------------------------

Please Accept as Solution if this post answered your question so other members can find it. If you found this post helpful consider giving my post a Thumbs Up!

View solution in original post

Community Support Team
Community Support Team

Re: Collect specific record

Hi @bhayden ,

 

Did you mean that you already have a collection exists and you want to add one record from another data source to this collection?

 

If so, then the formula should be something like:

 

Collect(CollectionName,Item)

Item should be the record that you want to add to the collection. For example:

Collect(CollectionName,Last(List1))

This would add the last record in List1 data source to the collection.

 

 

Regards,

Mona

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
bhayden
Level: Powered On

Re: Collect specific record

Thank you sir, I was very close but you filled in the missing piece for me.

Helpful resources

Announcements
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 322 members 6,744 guests
Please welcome our newest community members: