SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

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


Posted 05-10-2007 9:33 PM by sondergaard

Comments

anne wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 09-19-2007 9:36 PM

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!

Kevin Perkins wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 11-09-2007 3:24 PM

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.

Rich wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 12-19-2007 9:20 AM

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

Rich

Manish MISTRY wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 04-02-2008 7:30 PM

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 ?????

Sakendrick wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 05-13-2008 12:02 PM

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?

Dave wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 05-22-2008 11:20 AM

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.

erugalatha wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 06-20-2008 4:46 AM

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.

erugalatha wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 06-20-2008 6:24 AM

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.

powerful features that don't work wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 07-17-2008 2:49 AM

sharepoint is bloody ridiculous

Logs of an SMS Administrator at myITforum.com wrote SharePoint 2007 - Workflows - URL Woes
on 07-22-2008 9:50 AM

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

adminBrian wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 08-18-2008 2:57 PM

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

adminAl wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 09-04-2008 9:49 AM

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.

Wayt wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 09-27-2008 7:32 PM

This approach also works to embed a link to a list item in an email generated by a workflow associated with that list:

<A HREF="[use "Add Lookup to Body" button to choose Current Item:Encoded Absolute URL]/../EditForm.aspx?ID=[Add lookup to Current Item:ID]">[Add lookup to Current Item:Name]</A>

The key is the /../ between the Asbolute Encoded URL and the EditForm.aspx in the hyperlink. That /../ effectively strips off the defective part of the URL (the part with .000 or whatever at the end), allowing you to tack on the name of the ASPX page you need and the ID query to the specific list item you want to link to.

Cheers,

Wayt

Wayt wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 09-27-2008 7:34 PM

The major benefit of the method I just suggested above, by the way, is that you don't have to hardcode the hostname of the SharePoint server. So the workflow should still work if the server name changes.

Jim wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 10-03-2008 4:32 PM

Thanks, Wayt!!

Freddy wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 10-10-2008 2:46 PM

Thanks Wayt!!  Your soluiton fixed my problem with using hard coded hostnames.

Using URL of list item in SharePoint workflows « onlydarksets wrote Using URL of list item in SharePoint workflows &laquo; onlydarksets
on 10-24-2008 9:36 AM

Pingback from  Using URL of list item in SharePoint workflows &laquo; onlydarksets

rüya tabiri wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 11-26-2008 10:13 AM

Thank you...

Rüya Tabirleri wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 01-14-2009 11:15 AM

Thanks, Wayt!!

whall wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 01-18-2009 3:09 PM

This was very helpful to me.  Like others, I was flabbergasted at the URL that the workflow interface gave me in SPD and figured I needed to generate my own.  This tip (especially Wayt's suggestion) was perfect.

I'm creating a custom IT helpdesk list so that people can create new "tickets" from the web or via email and I'm setting up the email notifications for new items and when they're closed.  I haven't gotten to the inbound email parsing yet but figure I'm in for a challenge.

joey jo ejoe wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 03-16-2009 3:03 PM

thanks for this! been trying to do this for a few hours.

Tried the first solution, but it doesnt handle spaces... so the WayT comment works with spaces, but the name is still 000'ed. Fixed by using the words "click to view online" (lol) instead of name.

Roy wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 05-07-2009 5:19 AM

Thanks wayt - excellent.

vanessa hudgens sex tape wrote re: MOSS Workflow isn’t always a walk in the park: “Encoded absolute URL”
on 06-11-2009 12:24 PM

Now with you vanessa hudgens sex tape

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.