Jump to content

Stuck with a lookup


miltont
 Share

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

Recommended Posts

Hi everyone,

I am stuck with a lookup to automatically populate some fields.

Tables are 1. Jobs and 2. Sites

Join is via Jobs::_id_Sites = Sites::_id_Sites

Other fields are:

Jobs::SiteAddress (Drop down list from Sites::Address)

Jobs::SiteContact

Jobs::SitePhone

Sites::Address

Sites::Contact

Sites::Phone

I want the fields Jobs::SiteContact and Jobs::SitePhone to be auto populated from Sites::Contact and Sites::Phone respectively

when the user chooses a Site address from the drop down list.

I have tried so many times and cannot get it to work.

Any help would be greatly appreciated.

Milton.

Link to comment
Share on other sites

First of all it is important to know that both choices are valid but are selected for different reasons.

You use lookups generally to capture moment-in-time data. Such as price information. When you create a sales order, you want to look up the prices, you do not want last year's order to show this year's prices.

For other purpose, it is often valid to merely display related data. What is supposed to happen if the site contact changes? Do you want to see the new site contact when looking at the job? Or, another possibility, the job contact should normally be the site contact by default, but sometimes you want the flexibility to assign somebody different.

In any case - to display related data you merely put a copy of the related field on the layout.

But since you appear to be having issues with correctly setting up relationships, I suggest you post a copy or clone of your file.

Link to comment
Share on other sites

First of all it is important to know that both choices are valid but are selected for different reasons.

You use lookups generally to capture moment-in-time data. Such as price information. When you create a sales order, you want to look up the prices, you do not want last year's order to show this year's prices.

For other purpose, it is often valid to merely display related data. What is supposed to happen if the site contact changes? Do you want to see the new site contact when looking at the job? Or, another possibility, the job contact should normally be the site contact by default, but sometimes you want the flexibility to assign somebody different.

In any case - to display related data you merely put a copy of the related field on the layout.

But since you appear to be having issues with correctly setting up relationships, I suggest you post a copy or clone of your file.

Bruce

I have attached a zip folder with the file, no passwords have been set.

Milton

Link to comment
Share on other sites

Bruce

I have attached a zip folder with the file, no passwords have been set.

Milton

Oops, no attachments. The attachment process here is a little confusing.

Link to comment
Share on other sites

There is no problem.

Your lookup is working correctly.

However, you seem to have confused yourself by using two fields with similar names.

_id_Sites

IDSites

In addition - if you are having difficulty in this VERY complex file with such basic concepts as display of related data, then this may not be a project you should be working on.

show_related.png

Link to comment
Share on other sites

This topic is 4356 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
 Share

×
×
  • Create New...

Important Information

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