Calling List2 from a List2 [message #2368] |
Mon, 16 November 2009 04:25 ![Go to next message Go to next message](/theme/default/images/down.png) |
ljkbrost
Messages: 59 Registered: April 2006
|
Member |
|
|
Hi,
I have a grandparent->parent->child relationship for a network monitoring database. The tables are:
Device
device_id
device_name
DevicePort
device_id
port_id
port_speed
PortMonitor
port_id
monitor_date
monitor_counter
I have create a list2 screen with:
outer_table = Device
inner_table = DevicePort
On this list2 screen I would like to create a navigation button called "Monitoring Data". You select the port from the current list2 screen, click the button and are sent to a new list2 with:
outer_table = DevicePort
inner_table = PortMonitor
When I implement this structure, my second list2 transaction is only sent "device_id" and NOT "port_id". I get the error message that the parent has not been selected.
If I change the screen to a list3, it works fine.
I don't want the complexity of a list3 at this point and I would like to go from a list2 to another list2.
How can I do this?
Thanks,
Kyle Brost
----
www.SoftElephant.com
|
|
|
Re: Calling List2 from a List2 [message #2369 is a reply to message #2368] |
Mon, 16 November 2009 04:39 ![Go to previous message Go to previous message](/theme/default/images/up.png) ![Go to next message Go to next message](/theme/default/images/down.png) |
AJM
Messages: 2361 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
When you select occurrences of 'DevicePort' and press a navigation button the framework will extract the primary key from every selected row and place it in the $where string which is passed to the next object. If the primary key of the 'DevicePort' table is 'device_id+port_id' then both values should be included.
If 'port_id' is being excluded then it is one of the following:
(1) It is not defined as part of the primary key, therefore is not being extracted into the $where string.
(2) It is being extracted, but somehow it is being filtered out.
If it is #2 then you will have to step through the code with your debugger so see where it is happening.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
|
|
|
|