Calculated Field Split String Capability
Would be nice to have a calculated field split string capability.
For example, if using a lookup, or managed metadata value that could be parsed with a delimiter.
For example:
Function would be split(Field Name, Delimiter, Index)
FieldValue = "Value1 | Value2 | Value3"
CalcField1 = split(FieldValue," | ", 0) // would return Value1
CalcField2 = split(FieldValue," | ", 1) // would return Value2
CalcField3 = split(FieldValue," | ", 2) // would return Value3
Thanks for your suggestion. I will update the ticket if we have anything to share on this idea.
Cheers,
Euan
-
David cross commented
What would be the use case for this? In workflows I use the regex feature for something similar and it works. And in case someone else is struggling with an idea for your use case, I use this in a workflow for the following purpose:
I have a document library that contains tax certificates. We have a specific naming convention when the files are uploaded to the doc library.
The file format is 10-digit customer ID, underscore, 8-digit effective date (YYYYMMDD), underscore, 8-digit expiration date (YYYYMMDD), underscore, 1-character certificate type code, underscore followed by the state(s) the certificate is applicable.
I use the regex feature to parse out the customer ID, effective and expiration dates an the certificate type. The workflow then moves the file to a folder with the expiration year and then sets the metadata fields corresponding to the Customer ID, Effective Date, Expiration Date and Cert Type.
If the filename doesn't conform to the regex, it sends an e-mail to the person who uploaded the file to check the file name for errors.
This has freed up lots of time for our tax department as they just need to drag and drop the certificates into the root of the document library and the workflow does the rest.