How can i get a list name - via sharepoint 2010 designer workflow? I can get the following tokens Server Relative URL and ItemURL which has the listname in it. But anyone have managed to get the list name by itself when using SP designer workflow 2010? Thanks in Advance
Get List Name in SharePoint 2010 designer workflow
You can not directly get the List name in SharePoint 2010 designer workflow. Also, The list's Title is not guaranteed to be part of the list's Path(URL).
I will suggest some work arounds to get the list name in workflow:
To get the Title of List:
- Best work around I have used till now is to create one more field in list which will have default value set to Title of list. Make this field hidden from list forms and remove from views also. You can access this field later in workflow under
To get the name of List from Path(URL):
- You can get the
Current Item URLunder
Workflow Context. set it to local workflow variable. Then substring that URL to get the list name using substring functions in SharePoint 2010 designer workflows.
Your URL Path to the Item is: http://siteUrl/Lists/NameOfList/DispForm.aspx?ID=itemID.
Just get the substring after Lists/ up to until /DispForm and save it another local varible as listName.
- Or you can use the same approach of creating hidden field and setting its default value to either full list URL or just Path/Display name of List.
You can do this by substring the Encoded Absolute URL and put the value in a new variable.
Here is some documentation about substrings in workflows.