Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Split a string by length (no delimiters)

Hi

I have a requirement to extract information from a document filename and use the data to populate multiple SharePoint columns (2016 On Prem).

I have been trying to use regextract without much luck.  Is there a better method available?  The regex that I would normally use is (.{10})(.{1})(.{1})(.{1})(.{1}) to array the first ten characters as the first value, followed by the next four characters as subsequent values.

My formula in Nitro Studio Workflow looks like this, currently:  $regextract([Name|FileLeafRef],@.{10})  --just trying to get the first ten characters before ramping up the complexity.

If I use this formula directly in an Update Item action, the workflow runs "successful" but does not actually update the field.  If I put the formula in a Set Variable, I get Exception in ComputeExtractFunctionValue: , Error: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.

Not sure what I am missing.  I checked the info in the regextract PDF document and the help site but was unable to find the answer.

Hi there, we are looking into this to find the right syntax for extracting that set of characters from the file name using the $regextract function.

We dug into this further and there seems to be an oddity (dare I say "bug"?) in the $regextract code in how it reads what is put in the "@expression" part. We are working to fix this.

PSolomon has reacted to this post.
PSolomon

Hi,
We have identified the issue and fixed in Online version of our product. We will be fixing in On-prem version in next couple of days and will send you updated solutions after that.

Hi,

We have fixed this issue in On-premises also. Please let us know your email address so that we will send you the latest NITRO Workflows solution along with upgrade instructions.