Imaging System Settings - Functions
Note: |
Function names are case-sensitive. Function Syntax:
|
The following custom functions are available

CharFromCode('charCode')
This function adds a character to the index line based on the ASCII value supplied.
'charCode' - ASCII character code.
Example
%CharFromCode('9') | - | Adds a Tab to the index line |
In this case the charCode 9 will return a tab character.
%Concatenation()
Concatenation(input1, input2, input3)
This function concatenates input1 and input2 strings with input3 as separator.
Example
%Concatenation('John', '1234', '-') | - | Return John-1234 |

CreateUserIndexString('separator')
This function concatenates all available FI indexes that are marked for imaging and lists them using the specified separator.
'separator' | - | A character used to separate index fields |
Examples
%CreateUserIndexString('^') | - | Return 123^Abc2^SampleDoc and concatenate all available FI Indexes using the ^ separator. |
%CreateUserIndexString('+') | Return 123+Abc2+SampleDoc and concatenate all available FI Indexes using the + separator. |

FormatDate({dateIndex}, 'format')
This function will supply a formatted string from an index value.
'dateIndex' | - | The date index that needs to be formatted |
'format' | - | The format that the date should be converted to |
Examples
%FormatDate({currentDate}, 'MM/dd/yy') | - | [ Result: 06/07/16 ] |
%FormatDate({currentDate}, 'MMM d yyyy') | - | [ Result: Jun 7 2016 ] |
%FormatDate({IMM_STDIND_DATE}, 'MM/dd/yyyy HH:mm:ss.ffff') | - | [ Result: 02/06/2020 00:00:00.0000 ] |
%FormatDate({IMM_STDIND_TIME}, 'dd MMM yyyy hh:mm tt') | - | [ Result: 06 Feb 2020 01:45 PM ] |
As Used in an Index String
{Document_Name},{Customer_Number},%FormatDate({IMM_STDIND_DATE}, 'MM/dd/yyyy HH:mm:ss.ffff') [ Result: Sample Doc,12345,02/06/2020 00:00:00.0000 ] |
{Document_Name},%FormatDate({IMM_STDIND_TIME}, 'dd MMM yyyy hh:mm tt') [ Result: Sample Doc,06 Feb 2020 01:45 PM ] |
For more information on custom date and time format strings, click here.

GetCurrentDateTime(format, timezone)
This function returns the current Date and Time information in the layout prescribed by the Format parameter.
'format' | - | The format that the date and time should be converted to |
'timezone' | - | This is an Optional parameter. Default value is UTC. When the parameter is a valid TimeZone, GetCurrentDateTime function will convert the time as per the TimeZone. |
Examples
UTC Date / Time: Friday, June 10, 2022 1:44 PM
%GetCurrentDateTime('MM/dd/yyyy') - Result: 06/10/2022
%GetCurrentDateTime('hh/mm/ss') - Result: 01:44:01
%GetCurrentDateTime('hh/mm/ss','Eastern Standard Time') - Result: 09:44:23
%GetCurrentDateTime('hh/mm/ss','Pacific Standard Time') - Result: 06:44:52

Left(index, numberOfChars)
This function retrieves X number of characters from an index string.
Example
%Left({index], '4') |
- | Retrieves the left 4 characters from the index value |
index | - | The index field to use |
numberOfChars | - | The number of characters to retrieve from the left of the index value. Must be a whole number |
If the index value is 12345, the new value will be 1234.

Len(String)
This function returns the length of the supplied string.
String | - | Any valid string expression or variable name. If the expression is of type ‘Object’, the Len function returns the size as it will be written to the file by the FilePut function. |
Return Value | - | Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable. |
Example
var value = "Hello World."
%Len(value) | - | Return length of a variable name value. |
In this case the length of 12 is returned.

This function is used to look up any index field value in a parameter file to replace the input string in index builder string.
Index.txt, OTG and ImageSoft
Lookup({index}, 'file name', 'separator', 'columnNumber', 'createFlag')
{index} | - | The index whose value is to be searched for in the parameters text file. |
'file name' | - | The parameters text file's name. Must include the file extension. This file should be created or updated using the Check In functionality in the General Settings menu. |
'separator' | - | The separator used between each column in the parameters text file's lines. |
'ColumnNumber' | - | The column number of the replacement value in the parameters text file. Note that the columns use zero-based numbering (e.g. the 2nd column is at index 1). |
'createFlag' | - | Set to 'true' to use parameter 'index' if the replacement value is not found. If the process of indexing should fail if the replacement value is not found, set to 'false'. |
Examples
%Lookup({Document_Name}, 'LookupValues.csv', ',', '1', 'false') - Searches for the Document Name in the LookupValues.csv file in column 0 (each column is divided by a comma sign) and returns the value at column 1 for that matching line.
If the value is not found, the document will not be moved.
%Lookup({Document_Name}, 'Parameters.txt', '+', '2', 'true') - Searches for the Document Name in the Parameters.txt file in column 0 (each column is divided by a plus sign) and returns the value at column 2 for that matching line.
If the value is not found, the Document Name is returned.
ProfitStars Synergy
@Lookup(searchValue,file name,separator,columnNum,createFlag)
searchValue | - | This is the moniker for the document name that will be used to lookup in the file. |
file name | - | This is the name of the text file. The file name can be changed but the extension must be either .csv or .txt. |
separator | - | This is the moniker for the separator value that is used in the text file. |
columnNum | - | This is the column from where the data will be extracted. |
createFlag | - | If set to "true", then the document name will be returned if it is not found in the text file. If "false", then indexing will fail if the document name is not found. |
This example is based on Document Name.
Sample Parameter File
The parameter mappings can be a Text (.txt) or Excel (.csv) file and must use a comma “,” as a separator. (Title row is for explanatory purposes and should not be included.)
Original Document Name |
FileRoom | Cabinet | Type | Replacement Document Name |
---|---|---|---|---|
Account_Card | Signature Cards | Signature Cards | Card | Account-Card-dokaa0 |
Account_Change | Signature Cards | Signature Cards | Card | Account-Change-d20000 |
Account_Receipt | Cert Receipts | Daily Work | Receipt | Account Receipt0d14000 |
Deposit_Notice | Hold Notices | Daily Work | Notice | Deposit-Hold-Notice-d24000 |
Member_ID | Verification Card | Identity Info Field | Info | Member-Identity-Info-Veri-Card-d4000 |
Payroll_Deduction | Payroll Deductions | PRD ACH DD | Auth | Payroll-Deduction-DD-Auth-D12000 |
Stop_Payment | Stop Payments | Daily Work | Request | Stop-Payment-Request-D21001 |
Sample Parameter File - Parameter.txt
Account_Card,SignatureCards,SignatureCards,Card,Account-Card-dokaa0
Account_Change,SignatureCards,SignatureCards,Card,Account-Change-d20000
Account_Receipt,CertReceipts,DailyWork,Receipt,Account-Receipt-d14000
Deposit_Notice,HoldNotices,DailyWork,Notice,Deposit-Hold-Notice-d24000
Member_ID,VerificationCard,IdentityInfoField,Info,Member-Identity-Info-Veri-Card-d4000
Payroll_Deduction,PayrollDeductions,PRDACHDD,Auth,Payroll-Deduction-DD-Auth-D12000
Stop_Payment,StopPayments,DailyWork,Request,Stop-Payment-Request-D21001
Examples - ProfitStars – Synergy
The Lookup function statement must be inserted into each applicable field. The example uses FileRoom, Cabinet, Type and DocumentName.
Each field should be populated as shown:
1 FileRoom:
%Lookup({Document_Name}, 'LookupValues.csv', ',', '1', 'false')
2 Cabinet:
%Lookup({Document_Name}, 'LookupValues.csv', ',', '2', 'false')
3 Type:
%Lookup({Document_Name}, 'LookupValues.csv', ',', '3', 'false')
4 DocumentName:
%Lookup({Document_Name}, 'LookupValues.csv', ',', '4', 'false')

PadLeft({index}, 'totalLength', 'paddingCharacter')
{index} | - | The index value that needs to be padded |
'totalLength' | - | The total length that the index value needs to be. Must be a whole number |
'paddingCharacter' | - | The character added to the left of the index value until the specified totalLength is achieved. Must be a single character. |
Example
%PadLeft({index}, '8', '0')
If the index value is 123456, the new value will be 00123456.
If the index value is 12345678, the new value will be the same.

PadRight({index}, 'totalLength', 'paddingCharacter')
{index} | - | The index value that needs to be padded |
'totalLength' | - | The total length that the index value needs to be. Must be a whole number |
'paddingCharacter' | - | The character added to the right of the index value until the specified totalLength is achieved. Must be a single character. |
Example
%PadRight({index}, '5', 'A')
If the index value is 12, the new value will be 12AAA.
If the index value is 12345, the new value will be the same.

RemoveLeadingCharacters({index}, 'charToRemove')
{index} | - | The index value that needs leading characters removed |
'charToRemove' | - | The character to be removed from the beginning of the value |
Example
%RemoveLeadingCharacters({index}, '0') - Removes all '0' characters from the beginning of the index.
If the index value is 000123456, the new value will be 123456.

ReplaceAlphaCharacters({index}, 'newValue')
{index} | - | The index value that needs to have all alpha characters (A - Z) replaced |
'newValue' | - | The value used to replace all of the alpha characters |
Examples
%ReplaceAlphaCharacters({index}, '0') - Replaces all alpha characters in the index with a '0'.
%ReplaceAlphaCharacters({index}, '') - Removes all alpha characters in the index. (Note: the new value is ‘’ – no space between single quotes.)

ReplaceCharacters({index}, 'oldValue', 'newValue')
{index} - The index value that needs characters replaced
'oldValue' - The text which needs to be replaced
'newValue' - The value used to replace the specified text
Examples
%ReplaceCharacters({index}, 'A', 'B') - Replaces all 'A' characters in the index with 'B' characters
%ReplaceCharacters({index}, 'temp', '') - Removes the text 'temp' in the index

ReplaceNumericCharacters({index}, 'newValue')
{index} - The index value that needs to all numeric characters (0 - 9) replaced
'newValue' - The value used to replace all of the numeric characters
Examples
%ReplaceNumericCharacters({index}, 'A') - Replaces all numeric characters in the index with an 'A'
%ReplaceNumericCharacters({index}, '') - Removes all numeric characters in the index.
Note: |
The new value is ‘’ – no space between single quotes. |

Right(index, numberOfChars)
This function retrieves X number of characters from an index string.
Example
%Right({index], '4') | - | Retrieves the right 4 characters from the index value |
If the index value is 123456, the new value will be 3456.

Substring({index}, 'startIndex', 'length', IgnoreError)
{index} | - | The index value source for the substring |
'startIndex' | - | The zero-based starting character position of a substring in this instance |
'length' | - | The number of characters in the substring |
IgnoreError | - |
This is an Optional parameter. Default value is false. When the length of the substring exceeds the length of given string, When the parameter is true,Substring function will ignore the error when the length of the substring exceeds the length of given string. |
Return Value | - | A string that is equivalent to the substring of length that begins at startIndex in this instance, or Empty if startIndex is equal to the length of this instance and length is zero |
Examples
var value = "This is a string."
%Substring({index}, '0', '4') - Return characters from a string begins from startIndex 0 and extend up to length of 4 characters. Here it returns "This". Substring will return error if the {index} length is less than 4 characters.
%Substring({index}, '0', '4','true') - Return characters from a string begins from startIndex 0 and extend up to length of 4 characters. Here it returns "This". No error will be returned if the if the {index} length is less than 4 characters.

Trim({index})
{index} | - | The index value that needs leading and trailing space characters removed |
{index} - The index value that needs leading and trailing space characters removed
Example
%Trim({Customer_Number})
If the index value is " 123456 ", the new value will be "123456".