Monday, August 1, 2016

Use Managed Metadata field value in SharePoint Designer Workflow emails

Hi Folks,

I've struggled a lot in using a value of Managed Metadata field value in SPD Workflow emails as it has issues with workflows and calculated fields. We can't read the Managed Metadata field values in Calculated column even.

But I got a way to use its value at least in SPD Workflow emails. Lets begin.

Create a SharePoint list say "Terms" with 2 fields: Title (Type: Single Line of Text) and TermCol (Type: Managed Metadata). Assign "TermCol" field to a term set you've created for business terms.

Then create a SPD workflow named "WF1 Terms".

1. Create a variable called 'Term' of type String. Within workflow, 2 fields will be created for "TermCol" field: TermCol and TermCol_0. We'll use TermCol_0 to read the value.

2. Set workflow variable 'Term' to value of 'TermCol_0'.




3. The value stored in variable 'Term' is like EFG-1DENA-NICOLE|19bd6c3e-0fa4-4b98-98cf-ca6da92e2bf0. The exact value is separated from its ID by "|". We need to split the values to read only the value in the workflow email.

4. Use the action "Find Substring in String" to split the value and ID in workflow variable 'Term'.



5. Use the action "Extract Substring from the start of string" to read only the value of Managed Metadata field.



6. Add the email step and use the value of workflow variable 'Term' to read the value of Managed Metadata field.

7. Run the workflow. It'll provide you the value of Managed Metadata field in the email generated via. workflow.