kentico_zdenekc
-
7/7/2009 2:58:23 AM
RE:Lookup values from another document type
Hi Robert,
you've maybe solved this already, I'm very sorry for the delay...I might even have increased your frustration, let's hope following info will be still usefull.
Your solution with the view should be possible, however from the given information I cannot identify the cause.
The easiest and optimal solution is to use "Repeater with custom query".
I've created a simple scenario according to your description, two doctypes "Team" and "League", Team contains field TeamLeague linked to LeagueID field of League doctype. LeagueName field of League contains the desired name, which we want to display in transformation.
I've created new transformation for Team documenttype:
SELECT ##TOPN## ##COLUMNS##, LeagueName FROM custom_Team INNER JOIN custom_League ON TeamLeague = LeagueID WHERE ##WHERE## ORDER BY ##ORDERBY##
Then I set this query in Content / Query name property of Repeater with custom query and in the transformation, I use:
team name: <%# Eval("TeamName") %>
team league id and name: <%# Eval("TeamLeague") %> <%# Eval("LeagueName") %>
--works fine for me.
Hope you will still find this helpful. Please let me know if you need any further details.
Best regards, Zdenek C.
|