crazy calculation

This topic is 6977 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a problem with a calculation / relationship setup.

Basically, I have a table full of lawsuits, and partes are joined to the suits table. The problem is in the display of the party names. The display can only have one plaintiff name vs one defendant name. If there are multiple plaintiffs or defendants, the name of either will have "et al" on the end of it.

I need to figure out how to calculate if there is more than a single plaintiff or defentant involved in the suit.

I have a lawsuits table, a partiesInSuit join table, and a parties table.

the partiesInSuit table is setup like this:

suitNum - sequence - partyid - partytype

1400 - 1 - 2 - plaintiff

1400 - 1 - 6 - defendant

1400 - 2 - 10 - defendant

So, in the join table I keep track of whether a party is a plaintiff or a defendant. There is also a sequence number that determines the priority of a party, 1 being dominant, and the rest following.

On just about every layout and printable form, I have to display

plaintiffname

vs

defendantname

As I said before, if there is more than 1 of a type of party, I have to show "et al"

plaintiffname

vs

defendantname et al

I can't figure out from a calculation how to tell if there are other defendants in the same suit. Can anyone suggest any ideas?

Share on other sites

You need to set up a relationship that pulls out all the plaintiffs or all the defendants on a given lawsuit, and then use Count to see if there is more than one record that matches that relationship. You have a few options for where to do this calculation, but since you

Share on other sites

Yes. Thank you, that works very well.

I was trying a backwards approach, trying to do a count calculation from the parties table itself.

Share on other sites

This topic is 6977 days old. Please don't post here. Open a new topic instead.

Create an account

Register a new account