Jump to content
Sign in to follow this  
Stanley Bezhanski

Problem with relationships

Recommended Posts

Hello everyone,

I have the following issue:

I have 3 fields - "company", "address" and "town". They are repeating in different layouts. I made a relation (using 2 tables) so when I enter all the information in "main" layout.... in other layouts ... i just select the "company" and the "address" and "town" show up automatically. The only problem is that sometimes one company has more than one address.

I'm doing this, because I don't want to fill up more than once information, which I already have. For example in new record, I just want to choose "company" and the rest 2 fields to show up.

Does somebody has similar issue ?

Thanks

Share this post


Link to post
Share on other sites

The company should be in one table and the multiple addresses should be in another. You should store the "Main" company address record ID in a field in your company table. Now when you create ( I am going to assume here ) an invoice, have the lookup for the address, town, etc, default to the main address. You probably should also allow the user to change it to one of the other address if need be.

Share this post


Link to post
Share on other sites

Okey, it's working now, but I have to choose between all the addresses, which I have entered. Can I stick only to ones, which are related to the company name ? or I made something wrong ?

Best regards

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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