• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8099
  • Last Modified:

SharePoint workflow formula to format a string...

I have a simple workflow where a value of a Managed Metadata column is copied to the Single Line of text column so I can use it in lookups. The problem is that oob it is copied with a guid and looks like this:

My First Item|7fa249c5-0fdf-421a-84d9-ab501a1815d0

Open in new window

Can somebody help me write a formula I could use in a workflow string builder to remove the pipe symbol and guid from this string?
1 Solution
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
Rainer JeschorCommented:
there is no really elegant out-of-the-box way as String manipulations are (unfortunately) very limited in SPD 2010.

Use the workflow to store the value inside of the string column. Then create a second column of type "Calculated Column" to use this formula:

Open in new window


You might want to install this workflow activity extensions - they provide additional string operations/actions:

MisUszatekAuthor Commented:
I was afraid I need to do the trick with the Calculated Column but it seems to be working OK. Thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now