Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Data View: how to follow lookup field link to document?

16 views
Skip to first unread message

rgru...@gmail.com

unread,
Aug 3, 2007, 6:30:21 AM8/3/07
to
Hello

My scenario: I'm on MOSS 2007. I have a custom
list, HRPolicy. In this list there is a lookup field - policy - that
lets the user select a document from a document library, HRPolicies.
On a page I have added a Data View Web Part to show the information
from the list HRPolicy. By default the value of the field policy is
formated as text only. I would like to have it as a hyperlink that
displays the document when click, exactly as if you were to add a list
directly as a web part. How can this be accomplished?

I have tried to use the ddwrt:URLLookup using the GUID of the list,
the field and the ID, but this doesn't work. In details I have the
exact same problem as this guy:
http://www.eggheadcafe.com/software/aspnet/29871868/data-form-web-par...
Seems that this worked on Sharepoint 2003, but not 2007.

I would guess that it is really simply procedure, but somehow I cannot
figure out how to get it done. I currently only have the name of the
document, in the policy lookup field. If I could get the ID I could
make the link by going
http://server/HRPolicies/Forms/DispForm.aspx?ID={@ID}&RootFolder=*
(where {@ID} would be the ID, but I do not know how to get this.

Anybody? Thanks a lot!

madhur

unread,
Aug 3, 2007, 3:15:49 PM8/3/07
to
On Aug 3, 3:30 am, rgrun...@gmail.com wrote:
> Hello
>
> My scenario: I'm on MOSS 2007. I have a custom
> list, HRPolicy. In this list there is a lookup field - policy - that
> lets the user select a document from a document library, HRPolicies.
> On a page I have added a Data View Web Part to show the information
> from the list HRPolicy. By default the value of the field policy is
> formated as text only. I would like to have it as a hyperlink that
> displays the document when click, exactly as if you were to add a list
> directly as a web part. How can this be accomplished?
>
> I have tried to use the ddwrt:URLLookup using the GUID of the list,
> the field and the ID, but this doesn't work. In details I have the
> exact same problem as this guy:http://www.eggheadcafe.com/software/aspnet/29871868/data-form-web-par...
> Seems that this worked on Sharepoint 2003, but not 2007.
>
> I would guess that it is really simply procedure, but somehow I cannot
> figure out how to get it done. I currently only have the name of the
> document, in the policy lookup field. If I could get the ID I could
> make the link by goinghttp://server/HRPolicies/Forms/DispForm.aspx?ID={@ID}&RootFolder=*

> (where {@ID} would be the ID, but I do not know how to get this.
>
> Anybody? Thanks a lot!

I could not understand your problem, the link you showed is not
working.

Madhur

rgru...@gmail.com

unread,
Aug 6, 2007, 3:02:47 AM8/6/07
to

Sorry about the broken link, Madhur.

Here is the link again (don't know why it was cut off before):
http://www.eggheadcafe.com/software/aspnet/29871868/data-form-web-part-ddwrt.aspx

Here is a post in Google Groups with the same issue:
http://groups.google.com/group/microsoft.public.sharepoint.development_and_programming/browse_thread/thread/3b90f19848c5c7d/fe83e461280bdfd4?lnk=st&q=Sharepoint+Data+Form+Web+Part+URLLookup+&rnum=1#fe83e461280bdfd4

If you still don't understand the problem, I will do my best to re-
explain it.

Thanks a lot!
Rasmus

0 new messages