This content has been marked as final. Show 4 replies
Can you retrieve pp_id from the List's dataprovider and pass that to a filterfunction for the myPP1 arrayCollection?
yes, I could retrieve "pp_id" from the array's dataprovider, but in many cases the first array "myPPreference" will have a list a numerous "pp_id"s. This is where I'm not sure how to set it up. If the first array only returned a single "pp_id" then I know how to catch that and put it into a variable and then filter the 2nd array against that.
But since the first array is returning a list of numerous "pp_id"s I'm not sure how to loop through that list and use each returned value to filter the 2nd array.
So basically I'm wanting to say: If the first array contains 3 rows, each with a "pp_id", then I want to filter the 2nd array by looping through the first array's rows and checking "does pp_id in the first row of the first array match any 'id' in the 2nd array", then repeats that question for each subsequent row in the first array until the first array is out of rows.
Here is an example of how this would look using SQL commands:
SELECT myPP1.id, myPPreference.pp_id, myPP1.ppName
FROM myPP1, myPPreference
WHERE myPP1.id = myPPreference.pp_id
Now I just need to figure out how to write a looping filter to do the same thing.
What you're trying to do is filter an array collection on multiple criteria.
Take a look at this: