1

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.

2 Answers 2

2

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

1

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):

=LEFT(Name,(SEARCH(",",Name,1)-1))

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)))

http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomizationlegacy/thread/ac908be0-9fe9-45aa-beae-0e7a968be90e/

check above link it helps......

6
  • How does that solve the question? Commented Mar 20, 2013 at 5:24
  • This is not really an answer to the question, besides mentioning of calculated columns Commented Mar 20, 2013 at 8:40
  • Try with Custom Event Receiver or JQurey........ Commented Mar 20, 2013 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. Commented Mar 20, 2013 at 16:55
  • OK so the solution was here: spdwfextensions.codeplex.com using the Replace() function from the Invoke C# action in SPD. THANKS!!! Commented Mar 20, 2013 at 23:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.