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
Microsoft
Microsoft

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
Microsoft
Microsoft

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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (64,728)