Text
Takes six parameters, FieldBase, Destination, Function, Source, Value, IfLenFld
Usage:
FieldBase, Destination, Function, Source, Value, IfLenFld
[WorkWith], Destination, Function, Source, Value, IfLenFld
[WorkWith], Destination, Function, Source, Value, [""]
[WorkWith], Destination, Function, Source, [""], [""]
FieldBase, Destination, Function, Source, Value, [WorkIf]
[WorkWith], Destination, Function, Source, Value, [WorkIf]
[WorkWith], Destination, Function, Source, [""], [WorkIf]
Description:
An optimized way to perform string manipulation in bulk on multiple records simultaneously.
Evaluates the Function and places the requested value into the Destination Field.
For the DateTime function only, if the Work Query field Error does not already exist when this option is run, it will be created. For any errors that occur per record, the error message for each record will be placed in the Error field.
List of Functions:
Dates and Times
Alpha Case
Numeric Base String
- Hex source, width
- Bin source, width
Encoding
Valid Characters
Test if all characters are valid:
Remove and/or replace any invalid characters to create a valid string:
String Manipulation
- Reverse source
- Extract source, search
- ExtractAny source, search (case sensitive)
- Remain source, search
- RemainAny source, search (case sensitive)
- BeforeLast source, search (case sensitive)
- Last source, search (case sensitive)
- BeforeLastAny source, search (case sensitive)
- LastAny source, search (case sensitive)
- Remove source, search
- RemoveAny source, search (case sensitive)
- RetainAny source, search (case sensitive)
- Trim source, search (case sensitive)
- TrimAny source, search (case sensitive)
- LTrim source, search (case sensitive)
- LTrimAny source, search (case sensitive)
- RTrim source, search (case sensitive)
- RTrimAny source, search (case sensitive)
- Left source, value
- Right source, value
- Truncate source, value
- Mid source, values (values is space-separated start length)
- Replace search, newval
- ReplaceAny search, newval (case sensitive)
- Repeat source, count
- Keywords source
Formatting
Disk Files
- Dir [path-mask] - no path-mask on subsequent calls/records gets next file name. Use SetFirst to set only first record in the Work Query. See also ListFiles.
- FileExists path
- FolderExists path
- LoadFile destination, path (see also Files for error handling)
- SaveFile destination, source (see also Files for error handling. Destination param is the file name but must be stored in a field, not a text literal)
- AppendFile destination, source (see also Files for error handling. Destination param is the file name but must be stored in a field, not a text literal)
Path
Shell
Security
Database Values
Example:
Using LongDate function
NewFields "Date.Received"
Lookup "Date.Received", "`Biz.Job", `pJob, "`Received", ""
Text "Date.Received", "LongDate", "Date.Received"
'Result: Date.Received: December 12, 2016