Variable

Action or Value

Example

[SPLIT(string|delimiter|index|delimiter|index|...)]

Split "value" by the given "separator" and return element number "index".


Using a positive number for the index will return the element starting from the front. 


Using a negative number for the index will return the element starting from the end. 


index and delimiter can be repeated to take the previous result and split it again. Can be repeated as many times as necessary.


Using 0 for the index will return the split as a JSON array.


[SPLIT(this is a test| |2)] will return the text "is".


[SPLIT(this is a test| |-1)] will return the text "test".


[SPLIT(this is a test| |-3)] will return the text "is".


[SPLIT(this is a test| |0)] will return the following array:

   ["this","is","a","test"]


[SPLIT(this_IS-NOT~AAA_a_test|_|2|-|2|~|2)] = AAA


[SPLIT2(string|delim1|delmi2|index)]

Split "value" by the 2 given delimiters (opening and closing) and return element number index.


string = the string to be split


delim1 - the opening delimiter


delim2 - the closing delimiter


index - the index (offset) of the split value. If there are multiple sets of split delimiters, you use this to specify which one to return.



[SPLIT2(Inv Num <123>|<|>|1)] will return the text "123"


[SPLIT(Answer to <a> is <b>|<|>|2)] will return "b"


[SPLITCOUNT(string|delimiter)]


[NUMELS(string|delimiter)]


Returns the number of elements that will be returned when using the SPLIT variable

[NUMELS(this is a test| )] will return 4

[REPLACE(string|value1|value2|Start|Len|IgnoreCase)]

Replaces one value with another value


Start and Len are used to specify the section of the string to replace.


Set IgnoreCase to 'True' to make sure the replacement is not case sensitive



SPECIAL NOTE FOR CURRENCY SYMBOLS!! Currency symbols can be tricky to replace during OCR operations. The OCR system in the cloud is not always a dollar sign. If you try to replace $ then it may not work. If you are trying to remove the currency symbol you can normally use the [DECIMAL()] variable.


[REPLACE(test|t|x)] returns "xesx"


[REPLACE(test|t|x|0|1)] returns "xest"

[REPLACE(test|t|x|3|1)] returns "texest"


[REPLACE(test|T|X)] returns "test"


[REPLACE(test|T|X|||true)] returns "XesX"


[REPLACEEXT(string|from1|to1|from2|to2|...)]

Replaces several strings in one operation. Use as many from and to variables as needed. They work in pairs.


SPECIAL NOTE FOR CURRENCY SYMBOLS!! Currency symbols can be tricky to replace during OCR operations. The OCR system in the cloud is not always a dollar sign. If you try to replace $ then it may not work. If you are trying to remove the currency symbol you can normally use the [DECIMAL()] variable.


[REPLACEEXT(This is a test|this|That| is | was |test|chore)]

converts "This is a test" to "That was a chore"


[REMOVE(string|str1|str2...)]

Removes from "string" any text elements that come after.


This operation is not case sensitive

[REMOVE(Testing|ing)] = Test


[REMOVE(Testing 1, 2, 3|,)] = Testing 1 2 3


[REMOVE(Testing 1, 2; 3|,|;| )] = Testing123


[NEWLINE(#)]

Returns a new line character. Can accept one parameter that is the number of lines to add. If omitted it assumes 1.


[NEWLINE()] - returns one line


[NEWLINE(4)] - returns 4 lines

[TAB(#)]

Returns a tab character. Can accept one parameter that is the number of tabs to add. If omitted it assumes 1.

[TAB()] - returns one tab


[TAB(2)] - returns 2 tabs

[CARRIAGERETURN(#)]

[DMCR(#)]

Returns a carriage return character. Can accept one parameter that is the number to add. If omitted it assumes 1.

[DMCR()] - returns one carriage return


[DMCR(2)] - returns 2 carriage return

[LINEFEED(#)]

[DMLF(#)]

Returns a line feed character. Can accept one parameter that is the number to add. If omitted it assumes 1.

[DMLF()] - returns one line feed


[DMLF(2)] - returns 2 line feed

[CHAR(ascii|#)]

Returns a character based on the ASCII code in the first parameter. Can accept second parameter that is the number of characters to add. If omitted it assumes 1.


ASCII chart reference (external site): 

http://www.asciitable.com/


[CHAR(9)] - returns one tab character (ASCII 9 is tab)


[CHAR(65|3)] - returns "AAA" (ASCII 65 is A)

[TRIM(value|char)]

Trims the white space from the front and end of string


value = value to trim from


char = character to trim


[TRIM( test )] returns "test"


[TRIM(00test00|0)] returns "test"


[TRIMSTART(value|char)]

Trims the white space from the start of string


value = value to trim from


char = character to trim


[TRIMSTART( test )] returns "test "


[TRIMSTART(0test0|0)] returns "test0"


[TRIMEND(value|char)]

Trims the white space from the end of string


value = value to trim from


char = character to trim


[TRIMEND( test )] returns " test"


[TRIMEND(0test0|0)] returns "0test"

[TRIMFROM(value|from|reverse)]

Trims off the end of a string starting with the first occurrence of the "from" string. Set "reverse" = true to trim the front of the string instead of the end.

[TRIMFROM(test_123_abc|_)] returns "test"


[TRIMFROM(test_123_abc|_|true)] returns "123_abc"


[TRIMFROMEND(value|from|reverse)]

Trims off the end of a string starting with the last occurrence of the "from" string. Set "reverse" = true to trim the front of the string instead of the end.

[TRIMFROM(test_123_abc|_)] returns "test"


[TRIMFROM(test_123_abc|_|true)] returns "abc"


[CONDENSE()]

Condenses extra spaces, tabs, line feeds and carriage returns into single spaces

[CONDENSE(This   is  a  test)] returns "This is a test"


[CONDENSE(This

is

a  test)] returns "This is a test"


[PAD(value|num|char)]

[PADRIGHT(value|num|char)]

Pads string with another up to length


value = the value to pad


num = the number of places to pad to


char = the character to use for the padding character (space is used if blank)


[PAD(ABC|5|x)] returns "ABCxx"


[PAD(ABC|5)] returns "ABC  "



[PADLEFT(value|num|char)]

Pads left side of string


value = the value to pad


num = the number of places to pad to


char = the character to use for the padding character (space is used if blank)


[PADLEFT(ABC|5|x)] returns "xxABC"


[PADLEFT(ABC|5)] returns "  ABC"



[LEFT(value|#)]

[RIGHT(value|#)]


Returns the left or right # characters from value


If # is negative, the number of characters returned will be the length of the string minus #.

[LEFT(ABCDEFG|2)] = AB


[LEFT(ABCDEFG|-2)] = ABCDE


[RIGHT(ABCDEFG|2)] = FG


[RIGHT(ABCDEFG|-2)] = CDEFG


[SUBSTRING(value|startpos|length)]

Returns a string from inside of another string


startpos is 0-based so the first character is 0. If set to negative then this is the number of characters from the end to start.


length is optional. If you omit this then this will return everything starting from startpos.


[SUBSTRING(ABCDEFG|0|1)] returns "A"


[SUBSTRING(ABCDEFG|1|2)] returns "BC"


[SUBSTRING(ABCDEFG|4|3)] returns "EFG"


[SUBSTRING(ABCDEFG|2)] returns "CDEFG"


[SUBSTRING(ABCDEFG|-4)] returns "DEFG"


[SUBSTRING(ABCDEFG|-4|2)] returns "DE"


[LEN(value)]

Returns the number of characters in the value passed to it.

[LEN(testing)] = 7

[SPLITSTRUCT(string|delimiter|exclude|el#|el#|...)]

Splits "string" using "delimiter" then either removes the elements by number (el#) or adds them back into the results using depending on the "exclude" setting.


exclude - If true then the returned value will EXCELUDE the elements at the el#s provided. If false the the return value is ONLY INCLUDE the elements at the el#s provided.


el# is 0-based so to refer to the first element you use the number 0, trhe scond is 1 and so on.


[SPLITSTRUCT(1_2_3|_|true|1)] returns 1_3


[SPLITSTRUCT(1_2_3|_|false|2|1)] returns 3_2



[STRUCT(value|start,len|start,len|start,len|...)]

Returns a string that is made up of pieces of an incoming string. Like SUBSTR but can processes multiple SUBSTR in one pass


value = the incoming string value to restructure


start = starting character (0-based) of the string to use for this portion


len = the number of characters to grab from the starting position. If you omit this portion then this will read to the end of the string.


"start,len" can be repeated as many times as necessary using | between each set


[STRUCT(testing|0,2|5|2,3)] returns "tengsti"



[JOIN(field|delim|prop|sort|unique)]


Joins collection of values. Works only on Record, Data and E-Form variable names


DO NOT use brackets around the field name for the JOIN statement. It needs to have the field name without brackets to work.


field = Name of the field to join (do not use brackets). This can also be a JSON collection using the prop setting.


delim - The character to use when joining the values into a string


prop - The property name to use when using JSON. This is ignored for field-based JOIN operations.


sort - Whether or not to sort the values before joining them (True/False)


unique - Whether or not to only join unique values (True/False). True means to NOT include duplicates.



Notes

-----

To use this in a case where you need the alternate record's data, surround the field name with << and >>.


One case where this is handy is in the Search / Create action where you need to bring over multi-value fields. The alternate record in this case would be the original record that started the workflow. The standard record is the one that was found with the search.


[JOIN(PO|;)] with a record that has 3 PO values of 12, 35 and 77 returns "12;35;77"


[JOIN(<<PO>>|;)] with an alternate record that has 3 PO values of 12, 35 and 77 returns "12;35;77"


[JOIN(PO|;||true)] with a record that has 3 PO values of 92, 35 and 77 returns "35;77;92"


[JOIN(PO|;||true|true)] with a record that has 4 PO values of 92, 35, 92 and 77 returns "35;77;92"


[REPEAT]

Repeats the given string N times

[REPEAT(ABC|2)] = ABCABC

[REPEAT(*|10)] = **********


[LOWER]

Converts text to lower case

[LOWER(AbCdE)] = abcde

[UPPER]

Converts text to upper case

[UPPER(AbCdE)] = ABCDE

[PROPERCASE] / [TITLECASE]

Converts string to proper case or title case


Proper/Title Case is where the first letter in each word is capitalized and all others are lower

[PROPERCASE(john q public)] = John Q Public

[ALPHANUM(Value|ReplaceChar)]

Replaces non-alphanumeric values with the value supplied. If ReplaceChar blank then the non-conforming characters are removed.

[ALPHANUM(a,b12,3)] = ab123


[ALPHANUM(a,b12,3|x)] = axb12x3


[ALPHA(Value|ReplaceChar)]

Replaces non-alpha values with the value supplied. If ReplaceChar blank then the non-conforming characters are removed.

[ALPHA(a,b12,3)] = ab


[ALPHA(a,b12,3|x)] = axbxxxx


[NUM(Value|ReplaceChar)]

Replaces non-numeric values with the value supplied. If ReplaceChar blank then the non-conforming characters are removed.

[NUM(a,b12,3)] = 123


[NUM(a,b12,3|x)] = xxx12x3


[DECIMAL(Value|ReplaceChar)]

Replaces non-numeric (including decimals) values with the value supplied. If ReplaceChar blank then the non-conforming characters are removed.


This is different from NUM in that it will also return periods in the string.

[DECIMAL(a,b12,3.)] = 123.


[DECIMAL($125.00)] = 125.00


[DECIMAL(125 dollars)] = 125



[REGEX(str|regex|matchnum)]


Finds matches in a string based on a a REGEX expression. 


str = String in which to find match


regex = REGEX expression to use for finding match


matchnum = The match number to return. Match #0 is the entire string that matched. If you use ( and ) for capture groups then the first one is returned as match #1, then match #2, etc.


* By default, the regex pattern is set to Ignore Case.

NOTE: Use /i  on the end of your REGEX Expression to make the matching be case insensitive.


NOTE - Use [~[REGEXEXPRESSION]~] to make sure your REGEX expression does not get stripped by the replacement system.


[REGEX(test 123 test|\d{3})] = 123


[REGEX(test 123 test|\d{3}|0)] = 123


[REGEX(test 123 test|(\d{3})|1)] = 123


[REGEX(test 123 test|[~[a-zA-Z0-9]*~]|0)] = test


[REGEXREPLACE(str|regex|replace)]

Uses REGEX expression to replace sub-strings inside string.


NOTE - Use [~[REGEXEXPRESSION]~] to make sure your REGEX expression does not get stripped by the replacement system.

[REGEXREPLACE(AbCd-123|[~[^a-z]~])] = bd


[REGEXREPLACE(AbCd-123|[~[^a-zA-Z]~])] = AbCd


[REGEXREPLACE(AbCd-123|[~[^a-zA-Z0-9]~]|:)] = AbCd:123


[RNDSTR(NumChars|SpecialChars)]

[RANDOMSTR(NumChars|SpecialChars)]

[RANDOMSTRING(NumChars|SpecialChars)]


Generates a random string of the given length. 


NumChars - The number of characters long to make the string


SpecialChars = whether or not to accept "special" characters. Currently - _ ~ and . are included if this flag is true.

[RNDSTR(10)] = ljahUy54JE


[RNDSTR(20|true)] = jh8Gf.f4~f_hgT6C9qK-



[INDEXOF(string|findstring)]

[LASTINDEXOF(string|findstring)]

Returns zero-based index of the first or last instance of findstring inside of the string value.

[INDEXOF(ABCDE|E)] returns 4


[INDEXOF(ABCDE|B)] returns 1



[TOCOLUMNS(val|RowDeli|ColDelim|Cols|Spacer)]


[COLUMNS(val|RowDeli|ColDelim|Cols|Spacer)]


Converts a single chunk of text into a fixed-width formatted data table. 


Val = Text value to be formatted


RowDelim = Row Delimiter


ColDelim = Column Delimiter


Cols = Column widths - comma-delimited


Spacer = Character to use to pad the column values (default is space)


[TOCOLUMNS(a^b^c~e^f^g|~|^|3,2,3)] = 


a  b c  

a  f g  



[TOLINEITEMS()]

This parses a text string and adds line item rows

See Table, Line Item and Loop Variables for details

[PIPE2CARET(value)]

Replaces pipe symbol - | - with a caret - ^ - in order to allow for parsing of values that have pipes in them.


[PIPE2CARET(test|one)] = test^one


[CARET2PIPE(value)]

Replaces caret symbol - ^ - with a pipe - | - in order to revert previously replaced pipes.


[CARET2PIPE(test^one)] = test|one

[PIPE2TILDE(value)]

Replaces pipe symbol - | - with a tilde - ~ - in order to allow for parsing of values that have pipes in them.


This is more useful than the PIP2CARET variable when dealing with values that already have carets in them such as LineItem_AllDelim.


[PIPE2TILDE(test|one)] = test~one

[TILDE2PIPE(value)]

Replaces tilde symbol - ~ - with a pipe - | - in order to revert previously replaced pipes.


[TILDE2PIPE(test~one)] = test|one

[VALIDFILENAME]

Returns string that contains only characters that are allowed in file names.


[VALIDFILENAME(abc/def)] = abcdef

[CSVFORMAT(str)]

Formats a string for inclusion into a CSV file. This logic replacing double quotes with 2 double quotes and wrapping the value in double quotes if double quotes or comma are in value.


str = String to format

[CSVFORMAT(test)] = test


[CSVFORMAT(testing 1, 2, 3)] = "testing 1, 2, 3"


[CSVFORMAT(test)] = "Testing" Value = """Testing"" Value"



[URLENCODE(str)]

Encodes a string to adhere to web URL standards for sending data in a query string. 


URL Encoding reference: https://www.w3schools.com/tags/ref_urlencode.ASP


[URLENCODE(abc 123)] = abc+123


[URLENCODE(2:30 PM)] = 2%3A30+PM

[URLDECODE(str)]

Decodes a previously encoded string into its original value

[URLDECODE(abc+123)] = abc 123


[URLDECODE(2%3A30+PM)] = 2:30 PM

FILENAME

Returns file name from file name/path

[FILENAME(c:\test.tif)] = test.tif

FILENAMEONLY

Returns file name without extension from file name/path

[FILENAMEONLY(c:\test.tif)] = test

FILEEXTENSION

Returns extension from file name/path

[FILEEXTENSION(c:\test.tif)] = tif

[SHA256(str)]

Hashes a string using SHA256. Returns a string that is base64 encoded.


str = string to hash


[SHA256(ABC123)] = E0BEBD22819993425814866B62701E2919EA26F1370499C1037B53B9D49C2C8A