This topic is locked

Formatting List Page

6/28/2004 5:15:32 PM
ASPRunnerPro General questions
author

Hello:
I have a list page and the City field [XCityID (FK)] is linked to the "Cities" table using the Lookup wizard. It's working fine when the user is trying to ADD or EDIT the record. But when you view the record on the list page, the ASPRunner is displaying the value of the dropdown combo box instead of the Name.
E.g.
On Edit Page

---------------

Clients
ID: 1 [text Box]

Name: XYZ

City: Toronto (within the combo box)[Value is 1]
On list page

--------------

Clients
ID: 1

Name: XYZ

City: 1
Can I display "Toronto" on the list page instead of 1???
Thanks.

dcampbe11 7/17/2004

Harry,
I am having the same problem. When I create an inner join as ASPRunner Pro recommended in an earlier email, the list page displayed the looked-up value but then the ADD/Edit pages no longer work. Since the lookup field is read from another table, you can not change the value using the lookup option.
So far the only solution, I have found is to use lookup tables to populate the main table with the acutal text string not the foreign key. This means that your database rows will become quite long and the practice of normalization is tossed out the window so to speak. Not a good thin <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=2240&image=1&table=forumreplies' class='bbc_emoticon' alt=':blink:' /> g!!

Sergey Kornilov admin 7/19/2004

You need to use INNER JOIN in SQL query to pull data from lookup tables on the list page. Here is the simple example:

select Field1, Field2, Field3, Table2.LookupField from

Table1 inner join Table2 on

Table1.ForeignKeyField = Table2.PrimaryKeyField