Can't seem to get my head around the Query part of this.
BO Tags is the "master" table of User Tags that can be used to classify Leads. (ie. Hot, Cold, North, South, Big, Small)
BO Lead has a pm_Tags reference. Allows Many Tags to be assigned to this Lead. I can successfully assign tags using a Multi-select on a Form.
To specify a Tag is desired to Filter on, I added a is_Selected attribute to the Tags BO.
I can navigate to BO Tags and set one (or more) to "Yes".
I only want to see Leads who have a Tag in their pm_Tags list WHERE is_Selected='Yes".
But the Query doesn't make sense to me.
I thought I had this working:
FIND Lead WHERE
(Lead.pm_Tags.is_selected='Yes' OR Lead.pm_Tags IS UNDEFINED)
I'm sure I need a CONTAINS, or IN, or something more than just this.
Not every Lead will have even 1 Tag - so I need to allow a Lead to be on the grid if its Lead.pm_Tags list is empty.
And sometimes I won't have ANY ' is_selected="yes" ' Tags, so this has to work in that case also (I thought about have a "clear" button when viewing BO Tags and if clicked, would set a RegularUser field to indicate "NoTagSelected" - and then a OR condition on the Query could use that as a failsafe to ignore any Tags stuff when the user didn't need them included.
Tom Ford has done this type of thing for years, but it involved Temp tables and several passes to build a result set.
I'd prefer to modernize this with an excellent solution.
thx