This topic is locked

Populate lookup droplist from third-party field

11/16/2009 9:02:01 AM
PHPRunner General questions
K
khanate author

Hello all,
Here's my latest problem:
I have a set of tables that work like this (generically described to keep it clear, I hope):
Table1 - Table of basic information about object type 1

Table1_id

Table1_name

Table1_color
TableA - Table of basic information about object type A

TableA_id

TableA_name

TableA_color
Table1A - Table to connect certain 1 object with a certain A object

Table1A_id

Table1A_table1id

Table1A_tableaid
Table1 has a field for its required color. TableA has a field for its object color. Table1A lets me select pairs which meet the required color rule.
While building the Table1A Add page, how can I make it so that only TableA objects that match the color of the selected Table1 object? I understand dependent lookup lists, but I can't figure out how to accomplish this, as the matching data is not stored in the currently-active table.
Thanks!
EDIT: In the query for Table1A, I added a field for Table1_color (SELECT Table1_color from Table1 where Table1a_table1id = Table1_id). In the Edit As page, I had it depend on what was selected in the Table1A_table1id field, but PHPRunner wouldn't allow me to then use it in the dependent section of the table1A_tableaid lookup.

J
Jane 11/17/2009

Hi,
unfortunately you can't use joined fields to set up dependent dropdown boxes.

You should add table1id field to the TableA table or Table1_color field to the Table1A table.