cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WebPortal
Post Prodigy
Post Prodigy

Lookup values in a collection

 

 

ClearCollect(MyCollection, Split("A,B,C", ",")) returns:

 

WebPortal_0-1607949515574.png

 

 

Now, I want to lookup each of these values into another table.

 

How to re-express the above to do that?

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @WebPortal ,

 

Could you tell me:

  1. Whats another table? (Have you used the gallery control to display this table?)
  2. Do you want to find the records you need by using the lookup() function?

 

If my assumptions are correct, I've made a test for your reference:

 

1\ Add a gallery control and set its Items property to:

LookUp(MyCollection,Result="A")

v-xiaochen-msft_0-1607998293740.png

 

 

If you want to query the Nth record, you could try the following steps:

1\ Add a gallery control and set its Items property to:

Last(FirstN(MyCollection,*))              // * is N. If you want to find the third record, * is 5.

v-xiaochen-msft_1-1607998293741.jpeg

 

 

In addition, If you just want to put all the data in the collection into another table, you could try the following steps:

1\ Add a gallery control and set its Items property to:

MyCollection

v-xiaochen-msft_2-1607998293743.jpeg

 

If my assumptions are wrong,could you provide more details? And I will happy to answer your questions.

Best Regards,

Wearsky

@v-xiaochen-msft 

 

Thanks a lot for your help!

 

By "other table", I mean a collection. Let's call it "OtherCollection".

 

I want to display the results in a combobox.

 

The issue is that in the combobox the user reads Names (stored in this "OtherCollection"), but the inputs will be A, B or C as currently per my "MyCollection". Therefore, I need a Lookup (with a combination of AddColumns perhaps?).

 

Thank you!

v-xiaochen-msft
Community Support
Community Support

Hi @WebPortal ,

 

Could you tell me:

  1. What’s Items property of “OtherCollection” ?
  2. What is the result you want to display in the combo box control?
  3. What’s “Names” ? Is it a column in “OtherCollection”?

 

I am sorry that I am confused about your question

Could you provide more details? And I will happy to answer your questions.

It would be better if you can provide formulas and pictures.

Looking forward to your reply.

 

Best Regards,

Wearsky

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,561)