Jump to content

[SOLVED] DW - How to show foreign key NAME in repeat region?


Recommended Posts

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

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.