Jump to content

check for uniqueness within related fields


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

Recommended Posts

Posted

Hi,

I have 2 tables: Contacts and Clients

The two tables are related by the field Company which appears on both tables. When I create a new Client and I pick the company name I have a portal on the Clients layout that displays all the Contacts that share the same Company Name.

On the Clients table I also have a field named "Shipping" that contains the value "Shipping" as auto entered.

On the Contacts table I have a field name Type that can be set to empty, Main or Shipping.

Finally there's one last relationship named "Shipping" that shows me in a single row portal on the Clients layout, the contact that shares the same Company Name and who's type is set to "Shipping".

Is there an elegant way to check and make sure only one contact in the Same Company relation can be set to type="Shipping" ?

Thanks!

Posted

I think that if you added a third table for Companies and add a PersonToShipTo field in this table, you would have no problems being certain that only one contact was set as the shippee. Yippee!

David

This topic is 6183 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.