Kent Searight Posted October 3, 2008 Posted October 3, 2008 Hi all, I've been trying for hours and I can't seem to figure out an easy way to do this. Here's the scenario: I need to figure out a way of testing to see if the related records of a found set of records have commonalities, and if so, what those commonalities are. In more specific terms, I have a found set of records from a table called Assets. An Asset can be related to one or more Projects (via a Usage table). In the course of a script, I need to test to see if my found set of Assets has at least one project that's common to the entire found set, and if so, the ID(s) of the Project(s). I've been working on this for a while and I just can't find a straightforward way of doing it. Thanks in advance for any help offered! -Kent
comment Posted October 4, 2008 Posted October 4, 2008 How about: Go to Record [ First ] Set Variable [ $commonIDs ; List ( Projects::ProjectID ) ] Loop Set Variable [ $commonIDs ; FilterValues ( List ( Projects::ProjectID ) ; $commonIDs ) ] Go to Record [ Next; Exit after last ] End Loop
Kent Searight Posted October 4, 2008 Author Posted October 4, 2008 Hi Michael, That's it. FilterValues() was what I was missing. Thanks a million!!! -Kent
Recommended Posts
This topic is 6244 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now