I have created a Custom List Form in SharePoint Designer for displaying items in a SharePoint List (A). One of the fields is a lookup of another List (B) for which there can be multiple values.
In the standard SharePoint DispForm.apsx, the value of the lookup field is displayed as links to the display view of each List B item that has been selected. They are on a new line like so:
Item 1 Item 2
When you create a Custom List Form, this instead produces a string of the text values (no links) from List B like so:
Item 1;Item 2
I have seen two solutions to getting the Custom List Form to display like the default DispForm.aspx but both have isses:
- Set the 'Item 1;Item 2' value on the SharePoint Designer page to display as List Form Field and change the view from 'Edit' to 'Display' (as provided by Quincy in this post: http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/f5ca14c2-925b-4f8d-b306-f7c3d1696be3/).
This works perfectly with the items linked to the correct items in List B. However, it shows the value from the first row of List A for every row instead of the value for the corresponding row (i.e. the first row of list A has items 1 and 2 selected from list B, the 5th row has items 3 and 9. when you display row 5 using this custom form it shows items 1 and 2)
- Use XSL to call a procedure which looks for ';' and splits the string into new lines. Then add a link around this. This works and shows the correct values for each list item we view. However, the link cannot be 'DispForm.aspx?ID=x' as the lookup doesn't store the ID. We can use 'DispForm.aspx?Title=x' but this just opens an blank version of the DispForm.aspx!
There are a few posts online asking the same thing with the 2 'solutions' above being the only real responses. There appears to be no answer though. Has anyone found a way of doing it?