This topic is locked
[SOLVED]

 Displaying Lookup Values On List Page

6/29/2004 3:13:15 PM
ASPRunnerPro General questions
D
dan_vt author

I am trying to find the best way to display lookup values on a list page. Here is a link to a page that allows you to see what I mean:
http://cabotweb/buzz_010_prealpha/000000...orXlineSoft.asp
username: demo

password: asprunner
The underlying schema is viewable at:

http://cabotweb/buzz_010_prealpha/xlinesoftDemo.pdf
The editable list view hits the table called cbtData_MktngActivities. That table has foreign keys from 3 other tables.
I'd like to be able to display the lookup values, as in the non-editable version, instead of the key values in the list view of the editable version.
Any tips?
As always, any information that will be of assistance will be most appreciated.

Sergey Kornilov admin 6/30/2004

Hi,
first of all I have to say that links to your localbox or your intranet won't open here.
To pull data from lookup tables I would recommend you to use SQL INNER JOIN. Here is the sample SQL query:
select field1, field2, table2.field1 from table1

inner join table2 on table1.ID = table2.ID
You can either use this query in ASPRunner or create a query/view in your database on the top of this query and use this view as a datasource in ASPRunner.

D
dan_vt author 7/5/2004

first of all I have to say that links to your localbox or your intranet won't open here.



Sorry...
the correct links are
http://citrix.cabotcheese.com/buzz_010_pre...orXlineSoft.asp
and the schema is at:

http://citrix.cabotcheese.com/buzz_010_pre...inesoftDemo.pdf
However, I think you answered my question already. Thx.

dcampbe11 7/17/2004

Hi,

To pull data from lookup tables I would recommend you to use SQL INNER JOIN. Here is the sample SQL query:
select field1, field2, table2.field1 from table1

inner join table2 on table1.ID = table2.ID
You can either use this query in ASPRunner or create a query/view in your database on the top of this query and use this view as a datasource in ASPRunner.



Sergy,
I did as you suggested ( used a MS SQL 2000 view for the inner join). The list page displayed the looked-up value correctly, but now the ADD/EDIT do not work. Using your example, when I set the lookup database for the EDIT/ADD pages, the EDIT page shows a dropdown with "Please Select" not the related value. If you select the correct value and submit you get an error
Perhaps, I am doing something wrong? Please provide a sample file so I can see exactly how you are geting it to work. A working URL would help as well?
Regards,
Richard

Sergey Kornilov admin 7/18/2004

Richard,
you can zip and send your ASP files to support AT xlinesoft.com for investigation. Also I need a SQL script to create required tables and views in SQL Server.