in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

peoplenet's blog

MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”

I'm the new kid on the blog: My main focus will be on the business potential of SharePoint 2007. Coming from background in strategy, e-business and knowledge management I'm really excited about the conceptual changes in 2007. Yes boys and girls, we are going to see some really interesting solutions coming from this platform. 

Though, this post is of a quite practical nature:

Recently, PeopleNet got a request from a customer who experiences problems with MOSS Workflow: he couldn't get the Workflow to include a valid URL to a list item in the email generated by the Workflow.

None of the fields in "Add Lookup to Body" seems to make sense. For instance, when using the field "Encoded absolute URL" the resulting URL looks something like this: http://intranet/Sites/DHL/Lists/Tilmelding/1_.000 . (Notice: this will work just fine in a document library).

You could solve this by using Visual Studio, but who wants to do that unless you have a gun to your head?

The solution seems to be to use HTML in the Workflow, thereby putting the available fields together:

Example:

This is a link to the <a href="http://intranet/[%LISTNAME:Path%]/DispForm.aspx?ID=[%LISTNAME:ID%]"> list item</a>

As simple as that!

I hope this was helpful - please share your own experiences with Workflow

Comments

 

anne said:

hello..

i can't really understand ur example..can u give an example with the real scenario?i'm confusing where to put the list name..thanx!

September 19, 2007 9:36 PM
 

Kevin Perkins said:

This worked for me, except....

If your LISTNAME is very long, and it is "friendly" with spaces, then you need to figure out a way to URLEncode that portion. Otherwise, SP wraps a the nearest space and thus truncates the URL (like in an email for instance).

The Server URLEncode property makes sense here. However, as you noted... it's outputting the version or ID. So, if you're doing an Attendees list, workspace, etc... no workie.

Anyway to use a function on that native value? I'm stuck.

November 9, 2007 3:24 PM
 

Rich said:

You rock...I was up half the night dinking around with the encoded URL.  I appreciate it!

Rich

December 19, 2007 9:20 AM
 

Manish MISTRY said:

I loved this one! And then I tested out some other properties and found that you have to concatenate as specified to get the URL, funny, huh?

=========

EncodedAbsoluteURL:adlvpc004/.../10_.000

URL: /Lists/Issues/10_.000

Path: Lists/Issues

GUID: {CE317CA9-D025-43F8-BFFF-1889D92230A2}

ID: 10

Name (For use in Forms) 10_.000

Server Relative URL: /Lists/Issues/10_.000

Title Linked To Item: SelfTest2

Title:SelfTest2

Type Item Linked to document ?????

April 2, 2008 7:30 PM
 

Sakendrick said:

Awesome... but for some reason the List Path is not pulling back correctly.  The path should be as follows:

Ticketing%20System%20and%20Master%20Action

But for some reason it is encoding in the URL as:

TicketingSystem%20and%20Master%20Action

Any ideas why this is??  Is it possible to create a string for the List Path?

May 13, 2008 12:02 PM
 

Dave said:

My problem with using HTML is that the server name ends up being hard-coded.

I develop on one box, then deploy to another. I don't want to have to change my workflow when moving servers.

Of course, that is one of the big pitfalls of SharePoint - any type of structured change management environment tends to have problems with SharePoint.

May 22, 2008 11:20 AM
 

erugalatha said:

Why have to go through all this?  Why doesn't the Encoded URL just get encoded correctly by SharePoint in the first place?

Plus your example is not very clear.  Shape up or ship out SharePoint.

June 20, 2008 4:46 AM
 

erugalatha said:

Why have to go through all this?  Why doesn't the Encoded URL just get encoded correctly by SharePoint in the first place?

Plus your example is not very clear.  Shape up or ship out SharePoint.

June 20, 2008 6:24 AM
 

powerful features that don't work said:

sharepoint is bloody ridiculous

July 17, 2008 2:49 AM
 

Logs of an SMS Administrator at myITforum.com said:

I&#39;m sure that there are people out there who have had this problem as I&#39;ve seen a LOT of posts

July 22, 2008 9:50 AM
 

adminBrian said:

Actually Sondergaard's url workaround just fixed a problem we've been pounding our heads on for a few days now.  Thanks!

August 18, 2008 2:57 PM
 

adminAl said:

I have to agree with Dave.  One of our biggest problems with using Sharepoint as an application platform, much less a document workflow application are things like this.  What do others do to migrate workflows from test to production?  Your link is now pointing to test.

September 4, 2008 9:49 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts