⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Pre-filtering data



jgalak
  • profile picture
  • Member

Posted 07 January 2014 - 23:44 PM

Here's the situation.  I am writing what is, effectively, a ticketing system.  I have a ticket table and a consultant table, and a a join table that shows what tickets are assigned to what consultant.  I've set it as an n-n relationship, everything works fine.

 

But now I want to set it to show only those items assigned to the currently logged in consultant.  I have the consultant's id, which points into the consultant table.  What's the best way to filter only the assigned tickets?

 

I've seen suggestions using temporary tables and custom models, but both seem to be massive overkill.  Is there a simpler way to do it?  I poked around at the "where" command, but that doesn't seem to work over a join. 

 

Thanks,

Juliean.