cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

filtering one collection from a value of another collection

My biggest challenge at this time is filtering a collection from a value in another colllection.

 

1) I create collections one

     1-  ClearCollect(CableNumbers,('Cable Trace Form'.CableNumber));

2) I want to use the value from CableNumber that the user chooses and  filter a second collection by that value

     2 - ClearCollect(CableFrom,('Cable From'.FromDescription),('Cable From'.CableFrom),('Cable From'.CableNum));

 

Collection 1 is working as expected, but how do i go foward and create a second filter based off of the chosen value in Collection 1? 

 

This is my issue and any suggestion would be appreciated. I've been trying to set it up without success.

 

4 REPLIES 4
Highlighted
Anonymous
Not applicable

Re: filtering one collection from a value of another collection

In the Gallery1.Items put the following function:

Filter(
  CableForm,
  CableNum = First(CableNumbers).CableNumber
)
Highlighted
Anonymous
Not applicable

Re: filtering one collection from a value of another collection

Thanks for this reply.  The value i want to filter on is in a selected value in a drop down, not in a gallery. how would I use this formula if I wanted it to filter off of the object picked in the drop down?

 

I tried your code you've included here and though it's not failing, how would find the data based on the speicific entry chosen?

 

Highlighted
Anonymous
Not applicable

Re: filtering one collection from a value of another collection

Hi @Anonymous

 

 

 

If you want to filter based on selected value in a dropdown change your filter function to this:

 

Filter(
  CableForm,
  CableNum = DropDown.Selected.Value
)

I am not sure if I understood what you want to do correctly, maybe a screenshot would help?

Highlighted
Anonymous
Not applicable

Re: filtering one collection from a value of another collection

 

Helptext3.JPGThanks and yes, it's always better to see a screen print

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response 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 (8,964)