I have been developing and accumulating custom functions over the years and they have proved to be very useful. I am submitting these here. I hope they are found to be beneficial.
Functions included in the attached file include:
- DateTime
- StandardDate(String) - Transforms any valid string to the standard date format yyyy-mm-dd
- File
- FileDirDepth(Path) - Returns the zero based depth of the path (zero being the root)
- FileGetFolder(Path, Depth) - Returns the folder name given the zero based depth in the path (zero being the root)
- String
- LeftPart(String, Separator) - Returns the left part of a string up to the first separator
- RightPart(String, Separator) - Returns the right part of a string after the first separator
- Split(String, Delimiter, Index) - Returns the zero indexed part of a delimited string
- CleanSpace(String) - Trims string and replaces multiple spaces with a single space
- UnicodeToASCIIBasic(String) - Replaces all Unicode Characters with ASCII Basic equivalents
- Test
- InList(Variable, List) - If Variable is in List returns True. List must be pipe delimited
- IsValidEmail(String) - Returns True if string is a valid email format
- IsUUID(String) - Returns True if string is a valid UUID
To make these functions available in Alteryx, place the attached xml file in the folder C:\Program Files\Alteryx\bin\RuntimeData\FormulaAddIn if you have a standard installation. If the install is non-standard, find the \bin\RuntimeData\FormulaAddIn folder and place the attached xml file there. Ateryx will need a restart for the functions to be available.