4

I have a SharePoint workflow that will send out an email with details of my list item. The problem is that some of the details include data saved with that item that is managed metadata or a custom term. So the email ends up looking like:

Vendor: Doors Inc|699003a8-ca2f-46a4-b3b9-9d958ba905fb

Where "Doors Inc" is the term. I don't want to see the GUID.

This is all done via adding a lookup from the current item and picking the appropriate field (e.g. Vendor).

So the end result would be:

Vendor: Doors Inc

without the GUID. I can't seem to find a way to do this.

Rob
  • 1,077
  • 2
  • 17
  • 27

2 Answers2

5

See point (6) in this article. It is one of the limitations of using Metadata column in SharePoint.

Try using a string function like split to get just the text leaving GUID out.

Ken
  • 734
  • 2
  • 8
  • 22
1

We have the same problem with Lookup with Picker (ilovesharepoint addition), it returns lookups with a lot of junk, item 11, with value of 'This Item' is returned as 11;#This Item

We use another solution from the same crowd (http://ilovesharepoint.codeplex.com/) called Workflow activities, which has an action to extract substring with Regular Expression.

So in your case, you'd run regex to extract/match everything to the left of | which looks like:

^[^|]*

Obviously, this only works on-premises or where you may add custom code, Office 365 (other than Private Cloud) leaves you out to dry.

Simon C
  • 41
  • 3