Site Workflow - Getting list Item URL


Badge +2

I have setup a site workflow that sends an email for notifications when a list item is due.  I'm trying to include the list item URL as part of the email, but I'm having trouble. In the site workflow, I insert the "Encoded Absolute URL", but this didn't produce the desired results.  it adds a number to the end of the URL that when clicked downloads an empty file onto the desktop.  For example, normally the list item URL should be:

https://team.local.website/sites/somesubsite/Lists/some%20Tracking%20Log/DispForm.aspx?ID=105

However when using the "Encoded Absolute URL" I get

https://team.local.website/sites/somesubsite/Lists/some%20Tracking%20Log/105_.000

What am I doing wrong?  I'm using Nintex WorkFlow 2013 with SharePoint 2013.


13 replies

Userlevel 3
Badge +8

Try using a build string action and the Item ID as a variable i.e.

Site URL/lists/List Name/DispForm.aspx?id=ID

Badge +2

Thanks for the reply Andrew.  I had thought about that, but I don't know how to parse out the 105 from /105_.000. 

Userlevel 4
Badge +7

Hi J Hong

You shouldn't need to, using Andrew Wilkie‌'s approach the Item ID should just be 105

Userlevel 5
Badge +14

you are not doing anything wrong. this is how URL is internally stored.

you can get rid of numeric tail with following regular expression

_.d+$

203442_pastedImage_1.png

Badge +2

Thank you Andrew and Paul, not sure why I was thinking I had to parse it.  the ID worked great. 

Badge +5

Where do you find the "Encoded Absolute URL"?

Ken

Badge +5

Andrew,

I found that this format does not work:  Site URL/lists/List Name/DispForm.aspx?id=ID  (returns 404 error)

But this does:  Site URL/List Name/Forms/DispForm.aspx?id=ID

I tried the first version and beat my head against the wall trying to figure out why it didn't work.  I then stumbled upon the second format which worked as expected.

Any idea why the first format failed?  We're running SP 2016 Nintex 2016 (Forms & Workflow) on-prem.

Regards,

Ken

Badge +16

does your list name have a space in it?

Badge +5

No.  Both the internal and display are the same name.

Ken

Badge +16

Does it look like it should when it changes these variables to real values?

 Site URL/lists/List Name/DispForm.aspx?id=ID 

Badge +5

Both URL formats display the same ListName.

Ken

Badge +2

The URL you get from that regex isn't quite complete ... /lists/ListName/123

 

Rather use the following to pull out the id and stick it after dispform.aspx?id=

pattern:

(d+)_.d+$

replacement:

dispform.aspx?id=$1

 

5676iD6C1F274F0DA24FD.png

Badge +2
This will depend if you have a list or a document library, libraries use /forms, lists don't.

Reply