
Image Source: http://www.sharepointconfig.com/2010/04/10-ways-sharepoint-2010-improves-findability/
Managed Metadata columns are so cool and so nasty at the same time. If you want to display the value of a Managed Metadata column in a SharePoint Designer workflow, you get a horrible representation of it like ‘TermText|ba7e2a4f-6602-47a8-aa81-bca54756a356′.
The only solution I know for this is the one in the comment from Kristina P on Michal Pisarek’s (@MichalPisarek) blog post Managed Metadata Column Limitations (a post which I find myself referring to far too regularly).
Here’s the meat of it:
- Start with your managed metadata column (Column1Name)
- Create a 2nd column (Column2Name) in the list of type string
- Create a workflow that fires on create and/or on modify (depending on your needs) that copies the value from Column1Name into Column2Name.
- Create a 3rd calculated column (Column3Name) on the list. The formula for that column should be =LEFT([Column2Name],FIND(“|”,[Column2Name])-1) The calculation finds the pipe character and trims the value to a clean text value.
- Any emails where you need to display the value of Column1Name should use the value of Column3Name instead to send the plain text
++++++++++++++++
Separately, I am having issues with the workflow (which I really don’t think I should even have to use!). I’ve posted a question about it over on SharePoint StackExchange: SharePoint Designer Workflow Not Always Firing.
The workflow generally does exactly what it should. The issue we’re running into is that occasionally (and we haven’t figured out any pattern to it) the workflow simply doesn’t fire when a new item is created. It’s not that it fails, it never fires. There’s nothing in the workflow history for the item. I also don’t see anything like an error in the timer job history for the workflow job. It just seems like the workflow simply doesn’t fire.
If you have any idea what would cause occasional non-firing of such a simple workflow, I’d really appreciate your thoughts over on the SharePoint Designer Workflow Not Always Firing post.




9 comments
Skip to comment form ↓
stfbauer
November 9, 2012 at 10:34 am (UTC -4) Link to this comment
I haven’t tried this out but managed meta data columns are nothing more than a regular lookup fields. It should be possible to lookup the correct value from the taxonomyhiddenlist and use then the values in SharePoint. Never tried this out but it is my first idea I came up. There you might not have to add columns.
Sappai
November 20, 2012 at 8:18 pm (UTC -4) Link to this comment
Hi Stfbauer,
Could you please tell me how to get value from taxonomyhiddenlist?this list is not found in SPD workflow..
Thanks
Marc
November 20, 2012 at 10:07 pm (UTC -4) Link to this comment
Sappai:
FWIW, I wasn’t able to find it, either. Perhaps Stefan can shed some light.
M.
Sappai
November 20, 2012 at 8:19 pm (UTC -4) Link to this comment
I have a metadata field which allows multiple selection..above described works for single selection..Could you please tell me how to get value if its multiple selection?
Marc
November 20, 2012 at 10:06 pm (UTC -4) Link to this comment
Sappai:
I don’t have a good idea on how to render multi-valued managed metadata columns. This approach is a bit of a kludge as it is.
M.
Adrian Fiechter (@adrianfiechter)
January 19, 2013 at 3:14 pm (UTC -4) Link to this comment
There is a way to do it in SharePoint 2013: http://www.fiechter.eu/blog/Lists/Posts/Post.aspx?ID=37&mobile=0
Marc
January 19, 2013 at 7:38 pm (UTC -4) Link to this comment
Adrian:
Nice trick. It’s still horribly messy given what we’re trying to accompish. Thanks for sharing.
M.
Jaap
March 19, 2013 at 4:20 am (UTC -4) Link to this comment
Try this:
1) **Find substring in string** in which:
- substring is just the pipe | character
- string is your metadatafield_0 field
- output: index1
2) **Extract substring from string with length** in which:
- substring is your metadata_0 field from the current item
- starting location is 0
- end is the output of the first step (index1)
- output: substring1
Now log substring1. In my case this results exactly in all characters in front of the pipe character:)
Marc
March 19, 2013 at 9:42 am (UTC -4) Link to this comment
Jaap:
I swear I tried to go this sort of route and couldn’t get there. I don’t see **Find substring in string** in the installations I can get to. The only “Find” action I see is minutes between dates.
If it works for you, I believe you, and boy does it make me question my approach!
M.