Wednesday, 7 August 2013

SP2010: How to display a lookup column in a .aspx displayform

SP2010: How to display a lookup column in a .aspx displayform

I have the two Lists Articles(A) and Serial Inspections(S).
The Article-List has columns: Article-#, Name, DescriptionDE,
DescriptionEN, somemore...
The Serial Inspections: Inspection-#, Inspector, Values and a lookup
column which refers to the Article-#.
In Addition to that in SP2010 you can choose some more Columns which are
Displayed in the Serial Inspections list which are then Named like:
Article-#:Name.
Now i took the Sharepoint Designer2010 and made myself a Printable Form of
a single listitem in Serial Inspections. I basically took the
displayform.aspx and made changes. Accessing it by link
/printform.aspx?ID=1234 to show the entry with ID 1234.
I can select the Lookup Column Article-# itself. Now its important for me
to show the additional lookup column Article-#:Name but i cant choose it
from the x-path list.



Good approach: I got the HiddenID of the Lookup Column Artikel-#:
"Artikel_x002d_x0023" and the Additional Lookup Column Artikel-#:Name 's
ID is: "Artikel_x002d_x0023_x003a_Arti" So i tried: <xsl:value-of
select="@Artikel_x002d__x0023__x003a_Arti" />
Sadly that doesnt show anything... but the Artikel-# Column does work

No comments:

Post a Comment