SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a name that will always be in this format with varying numbers of _ and - symbols.

e.g. CWTE_4_3-My_Friendly_Name e.g. Inette_5-Friendly_Again

I need to convert these in my sharepoint designer workflow to replace the "_" and the "-" markes with "%2D" and "%5F" respectively.

I tried to do this in my Infopath form but Translate only works across one character limit. so I could replace "-" with "{" but not with "%2D".

Can I do this in Sharepoint Designer? I don't know if I can because the number of the _ and - varies.

share|improve this question
up vote 2 down vote accepted

OK so the solution was here: using the Replace() function from the Invoke C# action in SPD. THANKS!!! – April D.

share|improve this answer

Instead of using a workflow why don't you use a calculated column in the list itself? Go to the list > Click on Settings > Create Column. For the column name enter "Last Name", for the type of column choose calculated. For your formula use the following (replace name with the name of the column where the full name is):


Then to get the first name create another calculated column called "First Name" and use the following formula (again replace Name with your name column):

=RIGHT(Name,(LEN(Name)-SEARCH(" ",Name,1)))

check above link it helps......

share|improve this answer
How does that solve the question? – teylyn Mar 20 '13 at 5:24
This is not really an answer to the question, besides mentioning of calculated columns – Robert Lindgren Mar 20 '13 at 8:40
Try with Custom Event Receiver or JQurey........ – Nagaraju Pattem Mar 20 '13 at 10:51
that would work if i knew there were only 2 names. but there aren't. there could be 3 or 4 or 5. and there could be an "-" or not. i need a 'loop' function and i don't think one exists for designer. – April Drake Mar 20 '13 at 16:55
OK so the solution was here: using the Replace() function from the Invoke C# action in SPD. THANKS!!! – April Drake Mar 20 '13 at 23:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.