0

I have a DVWP with some data any a People/Groups field. Adjacent to each People/Groups field, I would like to include a "View Information" link that sends the current user to [site]/Pages/information.aspx?Name={Account Name} where {Account Name} is the account name of the listed person (typically domain\whatever).

I am finding this to be rather challenging since I can expose Account Name of "current user" through jQuery but can't find a way to expose it for just an item in a DispForm.

1 Answer 1

0

You should be able to achieve what you are after by using the ddwrt:UserLookup function.

<xsl:variable name="UserFieldLogin">
   <xsl:value-of select="ddwrt:UserLookup(string(@UserField) ,'Login')" />
</xsl:variable>

<a href="[site]/Pages/information.aspx?Name={$UserFieldLogin}"> 
<xsl:value-of select="@UserField"/></a>
1
  • That looks perfect on paper - and many searches, but I cannot make it work. I keep getting the same escaped user data in there (replacing specifics with elipses): "http...information.aspx?Name=<nobr><span><A HREF=".../_layouts/userdisp.aspx?ID=...">...,...</A><img border="0" height="1" width="3" src="/_layouts/images/blank.gif"/><a href='javascript:' onclick='IMNImageOnClick();return false;' class='ms-imnlink'><img name='imnmark' title='' border='0' height='12' width='12' src='/_layouts/images/blank.gif' alt='No presence information' sip='sip:...' id='imn_...,type=sip'/></a></span></nobr>
    – Cory M
    Commented Feb 12, 2014 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.