1 minute read
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.