Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Any way to get the susbstring from the start of the string until a specific character in a SharePoint designer workflow action? I cannot use "Extract Substring from Start of String" because there isn't a set number of characters i want to copy.

I need to get "1 Year" or "3 Months" from the below strings:

1 Year|5ff55ee4-5a60-2132-bc02-bbfdd9f190ab

3 Months|b553caa2-fww7-4c7f-b84e-22788d26386a

share|improve this question

migrated from stackoverflow.com Mar 13 '13 at 14:29

This question came from our site for professional and enthusiast programmers.

    
has any one got something on above? Please let me know.. additionally NO CODE DEPLOYMENT option.... Thank You. Addtionally my initial part is keep on changing.. i mean it will be like John Cena|5ff55ee4-5a60-2132-bc02-bbfdd9f190ab david mcarther|5ff55ee4-5a60-2132-bc02-bbfdd9f190ab ross kapito|5ff55ee4-5a60-2132-bc02-bbfdd9f190ab –  user17734 Jun 20 '13 at 5:11

1 Answer 1

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

Now log substring1. In my case this results exactly in all characters in front of the pipe character:)

share|improve this answer
2  
I'm unable to find the action "Find substring in string". Is this a default action in SharePoint 2010 (Foundation)? –  TempaC Sep 24 '13 at 14:56
    
Neat- Just done this as a 2013 workflow updating title on a lookup list with a MMS column –  westerdaled 2 days ago

Your Answer

 
discard

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