This topic is locked

showing a locationId dependant on two tables

6/8/2009 9:25:37 AM
PHPRunner General questions
S
swanside author

Hello.
I have a customer table with Customer_Name and CustomerId

I have a sites table with Customer_Name, Site_Address, LocationId and CustomerId

I have a job table with Customer_Name, CustomerId, Site_Address and LocationId
When I add a new job on the job add new page. I select my Customer from my Customer name, I then select my site from my Site_Address on my sites table.
I now need to show the CustomerId and the LocationId.
The CustomerId is ok, but the LocationId needs to be selected by the Customer_Name and Site_Address?
SO If I have Customer_Name = ASmith with a CustomerId of 343 and they have 3 sites say, SiteA which would have a locationId of 1234, SiteB with a locationId of 1235 and SiteC with a locationId of 1236.
Once this customer is selected, I need to select the Site as SiteA, but I now need to show locationId as 1234.
How can this be done?
Thanks

J
Jane 6/9/2009

Hi,
unfortunately PHPRunner do not support this type of dependent dropdown.

You can select only one field as database field. As workaround use Site_Address as Database field on the "Edit as" settings dialog.

S
swanside author 6/10/2009

Hi,

unfortunately PHPRunner do not support this type of dependent dropdown.

You can select only one field as database field. As workaround use Site_Address as Database field on the "Edit as" settings dialog.


Thanks Jane, Unfortunatly, I might have two of the same site addresses. for example.
CustomerA might pay bills for SiteA(Water Usage) CustomerB might pay bills for SiteA(Electric Usage)
So, I was wonder what the WHERE box does in the lookup wizard, Would it be possible to have some sort of clause in there similer to WHERE Customer_Name(on the jobs table)=Customer_Name(On teh sites table)
Thanks

Paul.

J
Jane 6/10/2009

Paul,
unfortunately no.

S
swanside author 6/10/2009

OK Thanks Jane.