Doing an intersection on models

  • 1
  • Question
  • Updated 5 years ago
OK
I have a form with 2 tabs
One shows records from the participants table.. and lets me filter by name

The other shows records from the participant_disability table, and lets me filter by disability (there will eventually be about 6 other tabs that filter on participant_address..etc)

once the user has set the filters on both tabs I want to be able to do an intersection of the selected participants... so the first tab show only participants that appear both in its filter, and in the filter of the second tab

i can use the api to access the list of participants in each tab and remove the participants in the first tab that i can't find in the second tab... can you suggest a more efficient approach

or would it be better to do this in an apex page ?
Photo of ktyler

ktyler

  • 9,244 Points 5k badge 2x thumb

Posted 5 years ago

  • 1
Photo of ktyler

ktyler

  • 9,244 Points 5k badge 2x thumb
another way to put this is, I want to be able to find participants that are in the first model, but not in the second model... so i need some sort of "find" method i can call on the second model's record set.. i don't think i see one in the api