Question
How do I show a foreign key NAME in a repeat region?
Hi All,
I have a product_list page where I want all of the details of each
record to be visible so I can check that they were entered properly.
Then I have EDIT and DELETE links for their intended use, all in a
repeat region.
The problem is that 4 of the 10 fields in the table are foreign keys
from other tables and their values were set by using drop-down lists. I
can show the value of each field but the foreign keys are numeric and I
want to show their word value from the other tables.
My repeat region is based on the listProducts recordset with the
following SQL:
SELECT *
FROM products
ORDER BY products.mod_num
but that is what gets me the numeric value in those foreign keys. I have
created separate recordsets for each of the foreign tables to select the
record name:
SELECT divisions.div_name
FROM products, divisions
WHERE divisions.div_id = products.div_id
When I test the SQL it works just right, however I don't know how to
include these recordsets in my repeat region behavior since the repeat
region behavior only allows one recordset to be defined. I have tried
creating one giant SQL to accomplish this but I can't figure out how to
do that.
Am I going about this the wrong way? Should I just make separate tables
and repeat regions for each of the foreign fields and align them? There
must be a simpler way than that.
TIA
I have a product_list page where I want all of the details of each
record to be visible so I can check that they were entered properly.
Then I have EDIT and DELETE links for their intended use, all in a
repeat region.
The problem is that 4 of the 10 fields in the table are foreign keys
from other tables and their values were set by using drop-down lists. I
can show the value of each field but the foreign keys are numeric and I
want to show their word value from the other tables.
My repeat region is based on the listProducts recordset with the
following SQL:
SELECT *
FROM products
ORDER BY products.mod_num
but that is what gets me the numeric value in those foreign keys. I have
created separate recordsets for each of the foreign tables to select the
record name:
SELECT divisions.div_name
FROM products, divisions
WHERE divisions.div_id = products.div_id
When I test the SQL it works just right, however I don't know how to
include these recordsets in my repeat region behavior since the repeat
region behavior only allows one recordset to be defined. I have tried
creating one giant SQL to accomplish this but I can't figure out how to
do that.
Am I going about this the wrong way? Should I just make separate tables
and repeat regions for each of the foreign fields and align them? There
must be a simpler way than that.
TIA
