Creating URL to a list


Badge +11

I am using Nintex 2010 and SharePoint 2010. When you are in a site workflow, how can you create a link to a list. The link will be used in an email notification in the workflow.


14 replies

Badge +3

The most reliable way I have found is to either create a variable with the path or in the email itself create a link with the following:

{Common:WebUrl}/Lists/<ListName>/

Or as a link to edit a specific item

{Common:WebUrl}/Lists/<ListName>/editform.aspx?ID={ItemProperty:ID}&Source={Common:WebUrl}

Hope this helps

Badge +11

I'd like to make the list name dynamic as well. I don't want to hard code it in case it changes.

Userlevel 7
Badge +17

Will you have the value of the listname somehow when the site workflow starts? Are any other pieces missing to complete your task?

Badge +11

I know what the list name is. But the workflow won't know it. And right now it is in a sandbox. When it gets moved it could change and I don't want someone to have to remember to change that. That was why I was hoping to make it know automatically. Suzanne's could work. I just don't want to hard code the list name.

Badge +11

Is there a way for the workflow to get the list name from SharePoint?

Userlevel 7
Badge +17

I know you already know of many ways. Let me list a few and we can review what you think are possible options.

  • Configuration list
    • Have a key/value list where Title field is the key and says "MySpecialWorkflowListName", and value is "MySpecialList"
    • Query on this config list for that key and get the value
  • Constant
  • Start Form variable
  • Site workflow is started by another workflow that has this data
  • Calculated
    • such as the list is on many sites, but the name is always "SiteTitle"+"MyspecialList"
  • The workflow asks for it through Request Data or some task
Badge +11

So I guess there is really no way without hard coding it somewhere in a site. I guess it is just unavoidable.

Userlevel 7
Badge +17

If it can't be guessed from a calculation, or provided by a user somewhere in the process, then it will have to be recorded somewhere on the site. Is there a specific content type used for the list items? Is there any other way to determine which list to link to? What makes it unique?

Badge +11

No its not a specific content type. I can't have to get the user to provide the list name because they wouldn't know because they are not power users. There isn't any other way that I can think of to know which list to link to without hard-coding it. If it wasn't a site workflow it would. I will just have to hard code the list name unfortunately.

Userlevel 7
Badge +17

Ok, then a constant may be the easiest way so that it can be changed without republishing. Plus you can easily track this between Dev and Prod and not have to make changes to the workflow once it is in prod, just change the constant.

Badge +11

Where are you talking about storing this constant? At the site level?

Badge +11

Ok, I got it! A workflow constant. That works better than hard coding it in the workflow. I still wish it could do it better but I know workflows can't do everything for you.

Userlevel 7
Badge +17

Maybe there will be an add-in action that let's us use Cortana. Then we can speak to the workflow and make it do stuff. cool.png

Badge +11

There ya go!!!! Make it a magician!!!

Reply