I have two lists, let's say "Parent" and "Child". There is a lookup in "child" list that point to "parent".
In a custom view of Child list, I'd like to have the title of "Child" display, with a link to a custom page with the Parent ID in the url.
In the custom XSL of my child view, I have written :
<a href="{$ServerRelativeUrl}/Pages/myPage.aspx?MyID={substring-before(@Parent., string( ';'))}" title="Open parent">
Open Parent
</a>
This is not working as expected, the myId argument is empty.
If I write instead :
<a href="{$ServerRelativeUrl}/Pages/myPage.aspx?MyID={@Parent.}" title="Open parent">
Open Parent
</a>
MyID equals 1;#1, the value in SPFieldLookupValue form.
How can I properly extract the remote ID to build a link?
PS: I choose to use Xslt View webpart only for this purpose. If there is a better alternative solution do not hesitate to let me know.