Filter BO2 "where BO2 pk not in (Select fkBO2 from BO1)"


Author
Message
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I have a BO1 typed to a table which has an FK that is the PK of BO2 ( no relationship setup between the BOs )



I want to filter BO2 to exclude records where the pk is found in the FKs of BO1



Guidance as to SF best practice for this appreciated Smile







Reply
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I know the techniques you are talking about and they work very well. This is something that came up in a wizard, where there is not really a parent-child relationship, but rather a situation where there is a checkedlistbox on page1 that displays PDF names. They are derived from a table which has, as one of its fields, the PK of the template (in the Templates table) used to generate the PDF in the first place.



The user selects PDFs.



The second page has a checked list box of templates which the user may select to generate further PDFs, but we don't want to show templates for PDFs that have already been generated.



So, on leaving page1, I am pulling the iTemplatekey from the PDFs bo based on the collection of PDF pks from the checkedlistbox. They become a collection to compare against the PKs in the TemplatesBO and set a filter.



I can visualize many instances of clientside data munging where this stuff is going to come in handy. I love the stuff built into the BOs on parent-child relationships, but this just adds another technique for stuff like this wizard thing.



( In exploring other ways to play with subsets of data already pulled, yesterday McGuffey dazzled me by figuring out filling list controls on the fly from the results of a LINQ query. Very useful in these kinds of situations. I'm getting pretty excited about LINQ in conjunction with the SF framework )

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search