Entry() only parses first two delimiters

Dec 7, 2015 at 10:21 PM
In my project, I need to parse a string in the format of:
firstOption|secondOption|thirdOption

Problem is that Entry() only fetches firstOption and secondOption no matter what. It seems like anything past the second delimiter
Look at the delimitered entries of myString, return index number 0, with a delimeter character of | and output the value to variable: delimitedOptionOne.
then Look at the delimitered entries of myString, return index number 1, with a delimeter character of | and output the value to variable: delimitedOptionTwo.
then Look at the delimitered entries of myString, return index number 2, with a delimeter character of | and output the value to variable: delimitedOptionThree.
I've tried starting with index of 0 and I've tried with an index of 1.
It never fetches a third index.
Coordinator
Dec 7, 2015 at 11:19 PM
I'm not sure why this could be happening. Just confirming the way you use this action is to pass the parameters should be as follows...
  • your "|" delimitered string as the first workflow action parameter (e.g. "firstOption|secondOption|thirdOption")
  • the number (0 based) of the entry you want to return as the second workflow action parameter (if you want to return "thirdOption", this parameter should be specified as a value of 2)
  • the delimeter character as the third workflow action parameter (in your example, "|")
The Entry() action performs a .Net Convert.ToInt32(InParam2) operation on the second workflow action parameter (the 0 based number). If this operation fails it should return an error suggesting why it failed.
Dec 8, 2015 at 2:33 AM
Edited Dec 8, 2015 at 3:11 AM
Here is the actual workflow.
The string I am parsing is an email subject line from an email-enabled Announcements list.
The subject comes in just right. So I am trying to fetch out the category, subcategory and title.

Here is proof of the E-Mail Subject (in the E-Mail details of the list item)
Image

Here is the workflow built in Sharepoint Designer 2010.
Image

Here is the title field in the workflow.
Image

And here is how title appears in the list!
Image

Maybe something else is wrong, but I can't figure out what it is.
One thing that is weird is that I have a "Category" column that keeps getting filled with the "14", which comes from the subcategory workflow variable, but there is nowhere in the workflow that should be setting that value - the default for the list field is blank and that column ought to be blank. I don't know why it's receiving any value at all. And there are no other workflows that can do it. I'm rather bewildered at that.

I even tried manually making an entry in the list and letting the workflow work - it does the exact same thing. Maybe there is some older workflow cached somewhere that is taking precedence?

Check this out.
So, this should set the column called "Category" to Bob. But it doesn't. Something else is wrong. It's as if an ancient workflow is cached somewhere and I can't update it.
Image
Coordinator
Dec 8, 2015 at 3:19 AM
Can you try setting up just a dummy list with perhaps a "E-mail Subject", "Category" and "Title" field (presumably the out of the box field), and configure a similar workflow just on that list, then manually create an item with the "E-mail Subject" value as per the one from your e-mail enabled list?

That way you can eliminate the prospect that some previous version(s) of the workflow aren't running...
Dec 8, 2015 at 3:23 AM
Edited Dec 8, 2015 at 3:28 AM
Okay, so I deleted the workflow completely.
It works now!
Thanks for your attention, Mr. Powney.

So what happened, I wonder. Was there a workflow in cache? How do I avoid this problem next time?
Coordinator
Dec 8, 2015 at 3:40 AM
Great to hear. Glad I could help...
I'm not sure - without looking under the hood at the list you were working on, it's hard to tell where the errors were coming from.