Compare Lists How To

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Compare Lists How To

Post by PointsWell »

I have two tables of data and one target table

Work has many Contributors and a Contract has many ContractParties.

From a Contract which has contract parties I need to find Work where the ContractParties are Contributors. Contract Parties might contain 2 entries or it might contain more. Contributors might contain 2 entries or it might contain more.

Other than writing a query that says

FIND Work WHERE EXISTS Contributor WHERE Contributor.psContact.Name='Jim' AND WHERE EXISTS Contributor WHERE Contributor.psContact.Name='Janice' etc etc for everyone in the ContractParties table

Does anyone have any tips on how to write a more generic version of that query, or am I going to have to create a string to capture all of that, store it in an attribute and then EXEC_STRING?
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Compare Lists How To

Post by customaware »

What is the commonality between Contributors and ContractParties?

Does not seem like they are the same thing but there is some relationship between then surely?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Compare Lists How To

Post by PointsWell »

eagles9999 wrote: Thu Nov 17, 2022 6:39 am What is the commonality between Contributors and ContractParties?

Does not seem like they are the same thing but there is some relationship between then surely?
So there is no commonality per se between the two. ContractParties determines the Works to search for on the basis that the Contributors match the ContractParties.
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Compare Lists How To

Post by customaware »

Seems I asked the wrong question....

You write "ContractParties determines the Works to search for on the basis that the Contributors match the ContractParties"

How can we tell if a Contributor matches a ContractParties?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
PointsWell
Posts: 1457
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Compare Lists How To

Post by PointsWell »

Apologies I misunderstood your question.

The Contributor and ContractParties are instances of Contacts.

Contributor.psContact
ContractParties.psContact

When you spend too long staring at the code and assume it’s common knowledge …
Post Reply