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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,722)