Introduction
Most Tools / Programming language supports making SQL Query dynamic. However there will be a time when its not possible or very hard. ZappySys drivers support unique way to make your SQL Query dynamic. You can use Function Placeholders anywhere in the SQL string, URL JOIN or Stored Proc Param usage and it will be replaced before its evaluated by Query Parser.
Using Placeholder functions in SQL
For example using placeholder in your SQL as below pass current date / time in yyyy-MM-dd format.
select * from mytable where date='<<yyyy-MM-dd,FUN_GETDATE>>'
Using Placeholder functions in URL JOIN
Here is how you can apply functions to URL join parameters when parent data is passed to child URL. See how we are reading Base64 data and pass it to child URL (after applying FUN_BASE64DEC function).
SELECT b.* FROM $
WITH(
--1st level (root)--
src='https://zappysys.com/downloads/files/test/nested-base64.xml'
,filter='$.soap:Envelope.soap:Body'
,alias='a'
--2nd level--
,join1_data='[$a.Result,FUN_BASE64DEC$]'
,join1_ElementsToTreatAsArray='Row'
,join1_filter='$.Data.Row[*]'
,join1_alias='b'
)
Using Placeholder functions in Stored Proc Parameter
Here is how you can use function for stored proc parameter.
CREATE PROCEDURE usp_GetOrders
@Country='UK'
AS
select * from Orders where Country='<@Country,FUN_TRIM>'
Step-By-Step
In this tutorial we will show you how to use static Placeholders to make things much cleaner and easier.
You can pass input values for placeholders by Direct value. Here is just an example of static placeholder.
-
Firstly, You need to Download and Install ZappySys ODBC PowerPack.
-
After you install ZappySys ODBC Drivers you can use Driver functionality few ways (see below).
-
- Using ODBC DSN (User level DSN or System level DSN)
- Using Direct ODBC Connection String
- Connect client app/server from Windows, Linux, Mac OS to ZappySys Data Gateway using Microsoft SQL Server Driver (i.e. JDBC, ODBC, OLEDB ...)
-
Regardless which method you choose from your App below steps will help you to configure your connectivity in correct way.
If you choose to connect using direct ConnectionString then also try below Steps to create correct ConnectionString which
you can copy from DSN Config Tool and paste inside your App / Programming Language Code.
-
Type odbcad32.exe in your search box and launch the DSN Config utility.
-
If you want access for yourself then stay of User DSN Tab. If you want grant access other users then go to System DSN tab.
For SQL Server Integration go to System Tab and add new System DSN rather than User DSN.
Click New button.
-
From the Driver list Select ZappySys ODBC Driver. For this example select [ZappySys JSON Driver].
-
Click on Finish button.
-
Now, Move in Preview Tab, Enter or Modify query in editor and hit on Preview Button to see value of Placeholder. Use following query for test.
SELECT * FROM $
WITH (SRC='http://httpbin.org/get?mypara=<<ABCDEF123##,FUN_BASE64ENC>>')
For more about function click here.
Error Handling (Default, Safe, Strcit Modes - v1.9 or later)
By default if function invocation fails due to some error it will skip placeholder replacement. But if you want to get actual error message as replacement or fail the process with exception then you can try following options (_SAFE or _STRICT suffix - must use v1.9 or later)).
Default error behaviour
By default when error is encountered in placeholder replacement due to bad parameter or syntax error, it will not do string replacement.
select 'MyValue: <<bad-date-value,FUN_TIMESTAMP_UNIX>>' as MyColumn
Returns
MyColumn
-------------
MyValue: <<bad-date-value,FUN_TIMESTAMP_UNIX>>
Safe error behaviour (_SAFE suffix) - Continue on error
Now lets look at how to return actual error message in the replacement. For that just add _SAFE suffix after function name like below.
select '<<bad-date-value,FUN_TIMESTAMP_UNIX_SAFE>>' as MyColumn
Returns
MyColumn
-------------
MyValue: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
Strict error behaviour (_STRICT suffix) - Fail on error
Now lets look at how to fail the execution on bad value and show error message rather than continue execution like previous two options. For that just add _STRICT suffix after the function name like below.
select '<<bad-date-value,FUN_TIMESTAMP_UNIX_STRICT>>' as MyColumn
Returns
Error: Failed to set place holder {{bad-date-value}}. Message: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
Function List
Along with format specifiers you can also use functions. See below list.
Function name |
Description |
FUN_NOW |
Returns current datetime using default ISO date format or custom format. Syntax:
<<[output_date_format],FUN_NOW>> |
FUN_TODAY |
Returns today's date using default date format yyyy-MM-dd or you can supply custom format. Syntax:
<<[output_date_format],FUN_TODAY>> |
FUN_TO_DATE |
This function evaluates date expression for known values (i.e. today/yesterday keywords) or can be applied on user defined date/time. It can add / subtract interval from date (e.g. today+3y, now-2m, weekstart+1d, +2h, +3d). Syntax:
<<expression[|~|output_date_format][|~|input_datetime],FUN_TO_DATE>> |
FUN_TO_DATETIME |
This function evaluates date/time expression for known values (i.e. today/yesterday keywords) or can be applied on user defined date/time. It can add / subtract interval from date (e.g. today+3y, now-2m, weekstart+1d, +2h, +3d). Syntax:
<<expression[|~|output_date_format][|~|input_datetime],FUN_TO_DATETIME>> |
FUN_TO_DATETIME_UTC |
This function is same as TO_DATETIME except it returns datetime in UTC. It evaluates date/time expression for known values (i.e. today/yesterday keywords) or can be applied on user defined date/time. It can add / subtract interval from date (e.g. today+3y, now-2m, weekstart+1d, +2h, +3d). Syntax:
<<expression[|~|output_date_format][|~|input_datetime],FUN_TO_DATETIME_UTC>> |
FUN_GETDATE_UTC |
Returns current datetime in UTC using default ISO date format or custom format. Syntax:
<<[output_date_format],FUN_GETDATE_UTC>> |
FUN_TO_UTC_DATE |
Converts local date to UTC date (after conversion time portion is removed) Syntax:
<<input_date_time,FUN_TO_UTC_DATE>> |
FUN_TO_UTC_DATETIME |
Converts local date to UTC date (after conversion time portion is removed) Syntax:
<<input_date_time,FUN_TO_UTC_DATETIME>> |
FUN_TO_LOCAL_DATE |
Converts UTC datetime to local datetime based on current system timezone (after conversion time portion is removed) Syntax:
<<input_date_time,FUN_TO_LOCAL_DATE>> |
FUN_TO_LOCAL_DATETIME |
Converts UTC datetime to local datetime (based on current system timezone) Syntax:
<<input_date_time,FUN_TO_LOCAL_DATETIME>> |
FUN_TIMESTAMP_UNIX |
Converts date/time to Unix TimeStamp which is integer number which represents number of seconds that have passed since January 1, 1970 (the birth of Unix a.k.a. the Unix epoch) Syntax:
<<[input_date_time],FUN_TIMESTAMP_UNIX>> |
FUN_TIMESTAMP_MS_UNIX |
Converts date/time to Unix TimeStamp which is integer number which represents number of milliseconds that have passed since January 1, 1970 (the birth of Unix a.k.a. the Unix epoch) Syntax:
<<[input_date_time],FUN_TIMESTAMP_MS_UNIX>> |
FUN_UNIX_TIMESTAMP_TO_DATE |
Converts Unix TimeStamp format to UTC date/time Syntax:
<<input_unix_timestamp,FUN_UNIX_TIMESTAMP_TO_DATE>> |
FUN_UNIX_TIMESTAMP_MS_TO_DATE |
Converts Unix TimeStamp format to UTC date/time Syntax:
<<input_unix_timestamp,FUN_UNIX_TIMESTAMP_MS_TO_DATE>> |
FUN_TRIM |
This function trims white spaces (i.e. new line, tab, spaces) around input string. Syntax:
|
FUN_TRIM_QUOTES |
This function trims single and double quotes around input string. Syntax:
<<input_text,FUN_TRIM_QUOTES>> |
FUN_UPPER |
This function returns upper case string. Syntax:
|
FUN_LOWER |
This function returns lower case string. Syntax:
|
FUN_REPLACE |
Search for sub string and returns a new string with replaced value Syntax:
<<input_text|~|search_for|~|replace_with|~|is_case_sensitive,FUN_REPLACE>> |
FUN_IF_NULL |
Returns custom string if input value is null else different string with value template (use $1 to reference input value in the return template) Syntax:
<<input_text|~|match_text[|~|not_match_text][|~|encode_function],FUN_IF_NULL>> |
FUN_IF_EMPTY |
Returns custom string if input value is empty (blank string) else different string with value template (use $1 to reference input value in the return template) Syntax:
<<input_text|~|match_text[|~|not_match_text][|~|encode_function],FUN_IF_EMPTY>> |
FUN_IF_NULL_OR_EMPTY |
Returns custom string if input value is null or empty else different string with value template (use $1 to reference input value in the return template) Syntax:
<<input_text|~|match_text[|~|not_match_text][|~|encode_function],FUN_IF_NULL_OR_EMPTY>> |
FUN_REGEX_REPLACE |
Search for string pattern using Regular expression and returns a new string with replaced value Syntax:
<<input_text|~|search_pattern|~|replace_with[|~|is_case_sensitive],FUN_REGEX_REPLACE>> |
FUN_REGEX_EXTRACT |
Returns string match using Regular expression Syntax:
<<input_text|~|search_pattern[|~|is_case_sensitive][|~|is_required],FUN_REGEX_EXTRACT>> |
FUN_MD5 |
Returns MD5 hash in Base64 format for specified input Syntax:
|
FUN_MD5HEX |
Returns MD5 hash in Hex format (all Uppercase). To output Hash in base64 use FUN_MD5. To output Hash in lowercase format use FUN_HASH_MD5_HEX Syntax:
<<input_string,FUN_MD5HEX>> |
FUN_FILE_MD5 |
Returns File content MD5 hash in Base64 format for a specified file path. File content can be text or binary. Syntax:
<<file_path,FUN_FILE_MD5>> |
FUN_FILE_MD5HEX |
Returns File content MD5 hash in Hex format (rather than Base64) for a specified file path. File content can be text or binary. Syntax:
<<file_path,FUN_FILE_MD5HEX>> |
FUN_FILE_NAME |
Returns file name from the input file path. Syntax:
<<file_path,FUN_FILE_NAME>> |
FUN_FILE_SIZE |
Returns file size (in bytes) for a single file or multiple files using wildcard pattern match. Syntax:
<<file_path_or_pattern,FUN_FILE_SIZE>> |
FUN_FILE_SIZE_RECURSIVE |
Returns file size (in bytes) for a single file or multiple files using wildcard pattern match. This function scans child folders too for wildcard pattern search. Syntax:
<<file_path_or_pattern,FUN_FILE_SIZE_RECURSIVE>> |
FUN_FILE_COUNT |
Returns total file count for a given wildcard pattern match. Syntax:
<<file_path_pattern,FUN_FILE_COUNT>> |
FUN_FILE_COUNT_RECURSIVE |
Returns total file count for a given wildcard pattern match. This function scans child folders too for wildcard pattern search. Syntax:
<<file_path_pattern,FUN_FILE_COUNT_RECURSIVE>> |
FUN_FILE_EXITS |
Returns file(s) exists status (True or False) for a single file or multiple files using wildcard pattern match. Syntax:
<<file_path_or_pattern,FUN_FILE_EXITS>> |
FUN_FILE_EXITS_RECURSIVE |
Returns file(s) exists status (True or False) for a single file or multiple files using wildcard pattern match. This function scans child folders too for wildcard pattern search. Syntax:
<<file_path_or_pattern,FUN_FILE_EXITS_RECURSIVE>> |
FUN_FILE_EXTENSION |
Returns file extension for a given file path. Syntax:
<<file_name_or_path,FUN_FILE_EXTENSION>> |
FUN_FILE_ENCODING |
Returns encoding type from the input file path. Possible return values are: ASCII, UTF8, UTF8WithoutBOM, UTF16, UTF16WithoutBOM, UTF32, UTF32WithoutBOM, UTF7, UTF7WithoutBOM, BigEndian, BigEndianWithoutBOM Syntax:
<<file_path,FUN_FILE_ENCODING>> |
FUN_FILE_ISLOCKED |
Returns lock status (True or False) from the input file path. If Some Program is locking file then returns True else False. Syntax:
<<file_path,FUN_FILE_ISLOCKED>> |
FUN_FILE_DIRECTORY |
Returns directory name for a given file path. Syntax:
<<file_path,FUN_FILE_DIRECTORY>> |
FUN_FILE_AGE_CREATE |
Returns file age in days based on CreationDate of the file. (e.g. If file was created 5 days ago then it returns 5). Syntax:
<<file_path,FUN_FILE_AGE_CREATE>> |
FUN_FILE_AGE_LASTEDIT |
Returns file age in days based on LastModifiedDate of the file. (e.g. If file was edited 5 days ago then it returns 5). Syntax:
<<file_path,FUN_FILE_AGE_LASTEDIT>> |
FUN_FILE_CREATE_DATE |
Returns file creation date in ISO date format (i.e. 2021-12-31T23:59:59.123). Syntax:
<<file_path,FUN_FILE_CREATE_DATE>> |
FUN_FILE_LASTEDIT_DATE |
Returns file last edit date in ISO date format (i.e. 2021-12-31T23:59:59.123). Syntax:
<<file_path,FUN_FILE_LASTEDIT_DATE>> |
FUN_FILE_BASE64ENC |
Returns BASE64 encoded string of local file content (binary or text). Syntax:
<<file_path,FUN_FILE_BASE64ENC>> |
FUN_FILE_NAME |
Returns file name from the input file path. Syntax:
<<file_path,FUN_FILE_NAME>> |
FUN_FILE_READ |
Reads local file and returns content as string Syntax:
<<file_path,FUN_FILE_READ>> |
FUN_FILE_WRITE |
Write content to a file. Returns file size if successful. If its append mode then returns appended text length. Syntax:
<<file_path|~|content|~|overwrite|~|append|~|create_target_folder_if_missing|~|encoding,FUN_FILE_WRITE>> |
FUN_FILE_WRITE_BINARY |
Write content to a file (bytes in BASE64 format). Returns file size if successful. If its append mode then returns appended byte array size. Syntax:
<<file_path|~|content_base64|~|overwrite|~|append|~|create_target_folder_if_missing,FUN_FILE_WRITE_BINARY>> |
FUN_FOLDER_NAME |
Returns folder name from the path. Syntax:
<<folder_path,FUN_FOLDER_NAME>> |
FUN_FOLDER_SIZE |
Returns folder size in bytes (including files from sub folders). Syntax:
<<folder_path,FUN_FOLDER_SIZE>> |
FUN_FOLDER_EXITS |
Returns folder exists status (True or False). Syntax:
<<folder_path,FUN_FOLDER_EXITS>> |
FUN_FOLDER_FILECOUNT |
Returns file count of a folder (including files from sub folders). Syntax:
<<folder_path,FUN_FOLDER_FILECOUNT>> |
FUN_FOLDER_AGE_CREATE |
Returns folder age in days based on CreationDate of the folder. (e.g. If folder was created 5 days ago then it returns 5). Syntax:
<<folder_path,FUN_FOLDER_AGE_CREATE>> |
FUN_FOLDER_CREATE_DATE |
Returns folder creation date in ISO date format (i.e. 2021-12-31T23:59:59.123). Syntax:
<<folder_path,FUN_FOLDER_CREATE_DATE>> |
FUN_HASH_MD5 |
Returns MD5 hash in Base64 format for specified input string Syntax:
<<input_string,FUN_HASH_MD5>> |
FUN_HASH_MD5_HEX |
Returns MD5 hash in HEX format for specified input string. To output hash in Base64 use HASH_MD5 function. Syntax:
<<input_string,FUN_HASH_MD5_HEX>> |
FUN_HASH_FILE_MD5 |
Returns MD5 hash in Base64 format for specified input file Syntax:
<<input_file,FUN_HASH_FILE_MD5>> |
FUN_HASH_FILE_MD5_HEX |
Returns MD5 hash in HEX format for specified input file. To output hash in Base64 use HASH_MD5 function. Syntax:
<<input_file,FUN_HASH_FILE_MD5_HEX>> |
FUN_HASH_SHA1 |
Returns SHA1 hash in Base64 format for specified input string Syntax:
<<input_string,FUN_HASH_SHA1>> |
FUN_HASH_SHA1_HEX |
Returns SHA1 hash in HEX format for specified input string. To output hash in Base64 use HASH_SHA1 function. Syntax:
<<input_string,FUN_HASH_SHA1_HEX>> |
FUN_HASH_SHA256 |
Returns SHA256 hash in Base64 format for specified input string Syntax:
<<input_string,FUN_HASH_SHA256>> |
FUN_HASH_SHA256_HEX |
Returns SHA256 hash in HEX format for specified input string. To output hash in Base64 use HASH_SHA256 function. Syntax:
<<input_string,FUN_HASH_SHA256_HEX>> |
FUN_HASH_FILE_SHA256 |
Returns SHA256 hash in Base64 format for specified input file Syntax:
<<input_file,FUN_HASH_FILE_SHA256>> |
FUN_HASH_FILE_SHA256_HEX |
Returns SHA256 hash in HEX format for specified input file. To output hash in Base64 use HASH_SHA256 function. Syntax:
<<input_file,FUN_HASH_FILE_SHA256_HEX>> |
FUN_HASH_SHA512 |
Returns SHA512 hash in Base64 format for specified input string Syntax:
<<input_string,FUN_HASH_SHA512>> |
FUN_HASH_SHA512_HEX |
Returns SHA512 hash in HEX format for specified input string. To output hash in Base64 use HASH_SHA512 function. Syntax:
<<input_string,FUN_HASH_SHA512_HEX>> |
FUN_HMAC_MD5 |
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the MD5 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_MD5>> |
FUN_HMAC_SHA1 |
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA1 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA1>> |
FUN_HMAC_SHA256 |
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA256>> |
FUN_HMAC_SHA384 |
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA384 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA384>> |
FUN_HMAC_SHA384 |
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA512 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA384>> |
FUN_HMAC_MD5_HEX |
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the MD5 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_MD5_HEX>> |
FUN_HMAC_SHA1_HEX |
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA1 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA1_HEX>> |
FUN_HMAC_SHA256_HEX |
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA256_HEX>> |
FUN_HMAC_SHA384_HEX |
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA384 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA384_HEX>> |
FUN_HMAC_SHA512_HEX |
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA512 hash function (Hash input data using user defined secret key) Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA512_HEX>> |
FUN_JSONENC |
Encodes string for JSON value (e.g. {NEWLINE} is replaced to \r\n, double quote to \", {TAB} to \\t ) Syntax:
<<input_string,FUN_JSONENC>> |
FUN_JSONDEC |
Decodes JSON string (e.g. \r\n is replaced to {NEWLINE}, \" to double quote, \\t to {TAB}) Syntax:
<<input_string,FUN_JSONDEC>> |
FUN_JSON_TO_TEXT |
Extracts Text from JSON array using JSON Path expression. You can specify expression like $.data[*] or $.data[*].email. If document is Array (i.e. starts with [ ) then root is referred as $.data[*] Syntax:
<<input_json|~|json_path[|~|separator],FUN_JSON_TO_TEXT>> |
FUN_XMLENC |
Encodes plain text to XML encoded value (e.g. > is replaced to > and < is replaced to < ) Syntax:
<<input_string,FUN_XMLENC>> |
FUN_XMLDEC |
Decodes XML value to plain text (e.g. > is replaced to > and < is replaced to < ) Syntax:
<<input_string,FUN_XMLDEC>> |
FUN_URLENC |
Encodes input string to percentage encoding format for URL (e.g. A&B is encoded to A%26B) Syntax:
<<input_string,FUN_URLENC>> |
FUN_URLDEC |
Decodes url encoded value to plain text Syntax:
<<input_string,FUN_URLDEC>> |
FUN_URLENCDATA |
Encodes input string to percentage encoding format for URL using exact same rules as FUN_URLENCDATA except space is encoded as %20 rather than + Syntax:
<<input_string,FUN_URLENCDATA>> |
FUN_NEW_GUID |
Creates a new unique GUID Syntax:
<<[format],FUN_NEW_GUID>> |
FUN_SEQUENCE |
Returns a number in a sequence (adds +1 in last number) Syntax:
<<[seed_number],FUN_SEQUENCE>> |
FUN_RANDOM_INT |
Generates a random integer from 1 to given max range Syntax:
<<[max_number],FUN_RANDOM_INT>> |
FUN_RANDOM_STR |
Generates a random string Syntax:
<<[max_length],FUN_RANDOM_STR>> |
FUN_BASE64ENC |
Encodes input string to BASE64 format Syntax:
<<input_text,FUN_BASE64ENC>> |
FUN_BASE64DEC |
Decodes base64 encoded string to plain text Syntax:
<<input_text,FUN_BASE64DEC>> |
Date Time Formatting
You can use DateTime format specifiers like below as long as DataType is DateTime. Click here to see full list of datetime format specifiers. Click Here to see list of predefined standard date time formats.
Example |
Sample Output |
<<yyyy,FUN_TODAY>> |
2016 |
<<yyyyMMdd,FUN_TODAY>> |
20161231 |
<<MMM dd, yyyy,FUN_TODAY>> |
Dec 31, 2016 |
<<MMMM dd, yyyy,FUN_TODAY>> |
December 31, 2016 |
<<yyyy-MM-ddTHH:mm:ss.fffZ,FUN_TODAY>> |
2016-12-31T23:59:59.999Z |
<<yyy-MM-dd hh:mm:ss tt,FUN_TODAY>> |
2016-12-31 11:59:59 PM |
Date/Time Functions
FUN_NOW
Syntax:
<<[output_date_format],FUN_NOW>>
Returns current datetime using default ISO date format or custom format.
Parameters:
Name | Description |
output_date_format (Optional) | [String] Custom date format. If not supplied default ISO date format (yyyy-MM-ddTHH:mm:ss) is used. For more information about custom date format specifiers check this link https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings You can also output in Unix Timestamp format by using format specifier unix_timestamp --OR-- unix_timestamp_ms |
Examples:
Example | Sample Output | Description |
<<FUN_NOW>> | 2020-01-31T23:59:59 | |
<<FUN_GETDATE>> | 2020-01-31T23:59:59 | |
<<yyyy-MM-dd,FUN_NOW>> | 2020-01-31 | |
<<yyyy-MM-dd HH:mm.fff,FUN_NOW>> | 2020-01-31 23:59.999 | |
<<yyyy, MMM dd,FUN_NOW>> | 2021, Mar 07 | |
<<yyyy-MM-dd hh:mm tt,FUN_NOW>> | 2020-01-31 11:59 PM | |
<<unix_timestamp,FUN_NOW>> | 1640210107 | Outputs data in Unix Epoch format (numeric timestamp). Assuming now is 22-Dec-2021 21:55:07 GMT |
<<unix_timestamp_ms,FUN_NOW>> | 1640210107000 | Outputs data in Unix Epoch format (numeric timestamp with milliseconds). Assuming now is 22-Dec-2021 21:55:07 GMT |
FUN_TODAY
Syntax:
<<[output_date_format],FUN_TODAY>>
Returns today's date using default date format yyyy-MM-dd or you can supply custom format.
Parameters:
Name | Description |
output_date_format (Optional) | [String] Custom date format. If not supplied default ISO date format (yyyy-MM-dd) is used. For more information about custom date format specifiers check this link https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings You can also output in Unix Timestamp format by using format specifier unix_timestamp --OR-- unix_timestamp_ms |
Examples:
Example | Sample Output | Description |
<<FUN_TODAY>> | 2020-01-31 | |
<<yyyy, MMM dd,FUN_TODAY>> | 2021, Mar 07 | |
<<yyyy-MM-dd hh:mm tt,FUN_TODAY>> | 2020-01-31 11:59 PM | |
<<unix_timestamp,FUN_TODAY>> | 1615179600 | Outputs data in Unix Epoch format (numeric timestamp). Assuming today is 2021-03-08T17:50:33 |
FUN_TO_DATE
Syntax:
<<expression[|~|output_date_format][|~|input_datetime],FUN_TO_DATE>>
This function evaluates date expression for known values (i.e. today/yesterday keywords) or can be applied on user defined date/time. It can add / subtract interval from date (e.g. today+3y, now-2m, weekstart+1d, +2h, +3d).
Parameters:
Name | Description |
expression | [String] This expression can be in the form of [function_name][+/-][interval]. For example to get Last date of previous month you can do "monthend-1d". To get yesterday's date you can just type "yesterday". Valid date function names for this expression are [ now | today | yesterday | weekstart | weekend | monthstart | monthend | yearstart | yearend ]. Valid interval names are [ms (for milliseconds) | s OR sec | min | h OR hour | y OR year | d OR day |m OR month | y OR year] |
output_date_format (Optional) | [String] Output format of date/time. e.g. yyyy-MM-dd HH:mm:ss.fff. Default format is yyyy-MM-dd. For more information on possible date format specifier check this https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings You can also output in Unix Timestamp format by using format specifier unix_timestamp --OR-- unix_timestamp_ms |
input_datetime (Optional) | [String] Date or Datetime for which you like to evaluate expression. If you do not supply this then current date is used as input for expression. |
Examples:
Example | Sample Output | Description |
<<today,FUN_TO_DATE>> | 2020-01-31 | Outputs today's date using default date format (i.e. yyyy-MM-dd) |
<<today||yyyyMMdd,FUN_TO_DATE>> | 20200131 | Outputs today's date using custom date format yyyyMMdd |
<<now||yyyy-MM-dd HH:mm:ss.fff,FUN_TO_DATE>> | 2020-01-31 23:59:59.123 | Outputs current datetime using custom date format |
<<today-5d,FUN_TO_DATE>> | 2020-01-26 | Subtract 5 days from today's date |
<<today+5d,FUN_TO_DATE>> | 2020-02-05 | Adds 5 days to today's date |
<<-5d||yyyMMdd||2020-01-01,FUN_TO_DATE>> | 20191227 | Subtract 5 days from input date 2020-01-01 and output using custom date format yyyyMMdd |
<<+2m||yyyMMdd||2020-01-01,FUN_TO_DATE>> | 20200201 | Adds 2 month in input date 2020-01-01 and output using custom date format yyyyMMdd |
<<today-1y,FUN_TO_DATE>> | 2019-01-31 | Subtract one year from today's date |
<<monthstart+3d,FUN_TO_DATE>> | 2020-01-03 | Adds 3 days to current month start date |
<<monthend+2d,FUN_TO_DATE>> | 2020-02-02 | Adds 3 days to current month end date |
<<yearstart+1y,FUN_TO_DATE>> | 2021-01-01 | Outputs next year's start date (Adds one year to current year's start date) |
<<yearend+1y,FUN_TO_DATE>> | 2021-12-31 | Outputs next year's end date (Adds one year to current year's end date) |
<<weekstart+1y,FUN_TO_DATE>> | 2021-01-01 | Outputs next year's start date |
<<yesterday||yyyMMdd,FUN_TO_DATE>> | 20200131 | Outputs yesterday's date using custom date format yyyyMMdd |
<<now||unix_timestamp,FUN_TO_DATE>> | 1640210107 | Outputs data in Unix Epoch format (numeric timestamp). Assuming now is 22 Dec 2021 21:55:07 GMT |
<<now||unix_timestamp_ms,FUN_TO_DATE>> | 1640210107000 | Outputs data in Unix Epoch format (numeric timestamp with milliseconds). Assuming now is 22 Dec 2021 21:55:07.000 GMT |
<<some-bad-expression,FUN_TO_DATE>> | 2020-01-31 | When bad input supplied it returns today's date using default date format (i.e. yyyy-MM-dd) |
<<2020-01-31,FUN_TO_DATE>> | 2020-01-31 | When a valid date/time supplied it returns the same date time in default format default date format (i.e. yyyy-MM-dd) |
<<2020-01-31T23:59:59||yyyy MM dd HH mm ss,FUN_TO_DATE>> | 2020 01 31 23 59 59 | When a valid date/time supplied it returns the same date time using requested format. If format is not supplied then default date format is used (i.e. yyyy-MM-dd) |
FUN_TO_DATETIME
Syntax:
<<expression[|~|output_date_format][|~|input_datetime],FUN_TO_DATETIME>>
This function evaluates date/time expression for known values (i.e. today/yesterday keywords) or can be applied on user defined date/time. It can add / subtract interval from date (e.g. today+3y, now-2m, weekstart+1d, +2h, +3d).
Parameters:
Name | Description |
expression | [String] This expression can be in the form of [function_name][+/-][interval]. For example to get Last date of previous month you can do "monthend-1d". To get yesterday's date you can just type "yesterday". Valid date function names for this expression are [ now | today | yesterday | weekstart | weekend | monthstart | monthend | yearstart | yearend ]. Valid interval names are [ms (for milliseconds) | s OR sec | min | h OR hour | y OR year | d OR day |m OR month | y OR year] |
output_date_format (Optional) | [String] Output format of date/time. e.g. yyyy-MM-dd HH:mm:ss.fff. Default format is yyyy-MM-ddTHH:mm:ss. For more information on possible date format specifier check this https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings You can also output in Unix Timestamp format by using format specifier unix_timestamp --OR-- unix_timestamp_ms |
input_datetime (Optional) | [String] Date or Datetime for which you like to evaluate expression. If you do not supply this then current date is used as input for expression. |
Examples:
Example | Sample Output | Description |
<<today,FUN_TO_DATETIME>> | 2020-01-31T00:00:00 | Outputs today's date using default date format (i.e. yyyy-MM-ddTHH:mm:ss) |
<<now,FUN_TO_DATETIME>> | 2020-01-31T23:59:59 | Outputs current datetime using default date format (i.e. yyyy-MM-ddTHH:mm:ss) |
<<now-5h,FUN_TO_DATETIME>> | 2020-01-31T18:59:59 | Subtract 5 hours from current time and outputs using default date format |
<<today||yyyyMMdd,FUN_TO_DATETIME>> | 20200131 | Outputs today's date using custom date format yyyyMMdd |
<<now||yyyy-MM-dd HH:mm:ss.fff,FUN_TO_DATETIME>> | 2020-01-31 23:59:59.123 | Outputs current datetime using custom date format |
<<today-5d,FUN_TO_DATETIME>> | 2020-01-26T00:00:00 | Subtract 5 days from today's date |
<<today+5d,FUN_TO_DATETIME>> | 2020-02-05T00:00:00 | Adds 5 days to today's date |
<<-5d||yyyMMdd||2020-01-01,FUN_TO_DATETIME>> | 20191227 | Subtract 5 days from input date 2020-01-01 and output using custom date format yyyyMMdd |
<<+2m||yyyMMdd||2020-01-01,FUN_TO_DATETIME>> | 20200201 | Adds 2 month in input date 2020-01-01 and output using custom date format yyyyMMdd |
<<today-1y,FUN_TO_DATETIME>> | 2019-01-31T00:00:00 | Subtract one year from today's date |
<<monthstart+3d,FUN_TO_DATETIME>> | 2020-01-03T00:00:00 | Adds 3 days to current month start date |
<<monthend+2d,FUN_TO_DATETIME>> | 2020-02-02T00:00:00 | Adds 3 days to current month end date |
<<yearstart+1y,FUN_TO_DATETIME>> | 2021-01-01T00:00:00 | Outputs next year's start date (Adds one year to current year's start date) |
<<yearend+1y,FUN_TO_DATETIME>> | 2021-12-31T00:00:00 | Outputs next year's end date (Adds one year to current year's end date) |
<<weekstart+1y,FUN_TO_DATETIME>> | 2021-01-01T00:00:00 | Outputs next year's start date |
<<yesterday||yyyMMdd,FUN_TO_DATETIME>> | 20200131 | Outputs yesterday's date using custom date format yyyyMMdd |
<<now||unix_timestamp,FUN_TO_DATETIME>> | 1640210107 | Outputs data in Unix Epoch format (numeric timestamp). Assuming now is 22 Dec 2021 21:55:07 GMT |
<<now||unix_timestamp_ms,FUN_TO_DATETIME>> | 1640210107000 | Outputs data in Unix Epoch format (numeric timestamp with milliseconds). Assuming now is 22 Dec 2021 21:55:07.000 GMT |
FUN_TO_DATETIME_UTC
Syntax:
<<expression[|~|output_date_format][|~|input_datetime],FUN_TO_DATETIME_UTC>>
This function is same as TO_DATETIME except it returns datetime in UTC. It evaluates date/time expression for known values (i.e. today/yesterday keywords) or can be applied on user defined date/time. It can add / subtract interval from date (e.g. today+3y, now-2m, weekstart+1d, +2h, +3d).
Parameters:
Name | Description |
expression | [String] This expression can be in the form of [function_name][+/-][interval]. For example to get Last date of previous month you can do "monthend-1d". To get yesterday's date you can just type "yesterday". Valid date function names for this expression are [ now | today | yesterday | weekstart | weekend | monthstart | monthend | yearstart | yearend ]. Valid interval names are [ms (for milliseconds) | s OR sec | min | h OR hour | y OR year | d OR day |m OR month | y OR year] |
output_date_format (Optional) | [String] Output format of date/time. e.g. yyyy-MM-dd HH:mm:ss.fff. Default format is yyyy-MM-ddTHH:mm:ss. For more information on possible date format specifier check this https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings You can also output in Unix Timestamp format by using format specifier unix_timestamp --OR-- unix_timestamp_ms |
input_datetime (Optional) | [String] Date or Datetime for which you like to evaluate expression. If you do not supply this then current date is used as input for expression. |
Examples:
Example | Sample Output | Description |
<<today,FUN_TO_DATETIME_UTC>> | 2020-01-31T00:00:00 | Outputs today's date using default date format (i.e. yyyy-MM-ddTHH:mm:ss) |
<<now,FUN_TO_DATETIME_UTC>> | 2020-01-31T23:59:59 | Outputs current datetime using default date format (i.e. yyyy-MM-ddTHH:mm:ss) |
<<now-5h,FUN_TO_DATETIME_UTC>> | 2020-01-31T18:59:59 | Subtract 5 hours from current time and outputs using default date format |
<<today||yyyyMMdd,FUN_TO_DATETIME_UTC>> | 20200131 | Outputs today's date using custom date format yyyyMMdd |
<<now||yyyy-MM-dd HH:mm:ss.fff,FUN_TO_DATETIME_UTC>> | 2020-01-31 23:59:59.123 | Outputs current datetime using custom date format |
<<today-5d,FUN_TO_DATETIME_UTC>> | 2020-01-26T00:00:00 | Subtract 5 days from today's date |
<<today+5d,FUN_TO_DATETIME_UTC>> | 2020-02-05T00:00:00 | Adds 5 days to today's date |
<<-5d||yyyMMdd||2020-01-01,FUN_TO_DATETIME_UTC>> | 20191227 | Subtract 5 days from input date 2020-01-01 and output using custom date format yyyyMMdd |
<<+2m||yyyMMdd||2020-01-01,FUN_TO_DATETIME_UTC>> | 20200201 | Adds 2 month in input date 2020-01-01 and output using custom date format yyyyMMdd |
<<today-1y,FUN_TO_DATETIME_UTC>> | 2019-01-31T00:00:00 | Subtract one year from today's date |
<<monthstart+3d,FUN_TO_DATETIME_UTC>> | 2020-01-03T00:00:00 | Adds 3 days to current month start date |
<<monthend+2d,FUN_TO_DATETIME_UTC>> | 2020-02-02T00:00:00 | Adds 3 days to current month end date |
<<yearstart+1y,FUN_TO_DATETIME_UTC>> | 2021-01-01T00:00:00 | Outputs next year's start date (Adds one year to current year's start date) |
<<yearend+1y,FUN_TO_DATETIME_UTC>> | 2021-12-31T00:00:00 | Outputs next year's end date (Adds one year to current year's end date) |
<<weekstart+1y,FUN_TO_DATETIME_UTC>> | 2021-01-01T00:00:00 | Outputs next year's start date |
<<yesterday||yyyMMdd,FUN_TO_DATETIME_UTC>> | 20200131 | Outputs yesterday's date using custom date format yyyyMMdd |
<<now||unix_timestamp,FUN_TO_DATETIME_UTC>> | 1640210107 | Outputs data in Unix Epoch format (numeric timestamp). Assuming now is 22 Dec 2021 21:55:07 GMT |
<<now||unix_timestamp_ms,FUN_TO_DATETIME_UTC>> | 1640210107000 | Outputs data in Unix Epoch format (numeric timestamp with milliseconds). Assuming now is 22 Dec 2021 21:55:07.000 GMT |
FUN_GETDATE_UTC
Syntax:
<<[output_date_format],FUN_GETDATE_UTC>>
Returns current datetime in UTC using default ISO date format or custom format.
Parameters:
Name | Description |
output_date_format (Optional) | [String] Custom date format. If not supplied default ISO date format (yyyy-MM-ddTHH:mm:ssZ) is used. Notice that default date format ends with Z to indicate UTC time. For more information about custom date format specifiers check this link https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings You can also output in Unix Timestamp format by using format specifier unix_timestamp --OR-- unix_timestamp_ms |
Examples:
Example | Sample Output | Description |
<<FUN_GETDATE_UTC>> | 2020-01-31T23:59:59Z | |
<<yyyy-MM-dd,FUN_GETDATE_UTC>> | 2020-01-31 | |
<<yyyy-MM-dd HH:mm.fff,FUN_GETDATE_UTC>> | 2020-01-31 23:59.999 | |
<<yyyy, MMM dd,FUN_GETDATE_UTC>> | 2021, Mar 07 | |
<<yyyy-MM-dd hh:mm tt,FUN_GETDATE_UTC>> | 2020-01-31 11:59 PM | |
<<unix_timestamp,FUN_GETDATE_UTC>> | 1615179600 | Outputs data in Unix Epoch format (numeric timestamp). Assuming today is 2021-03-08T17:50:33 |
FUN_TO_UTC_DATE
Syntax:
<<input_date_time,FUN_TO_UTC_DATE>>
Converts local date to UTC date (after conversion time portion is removed)
Parameters:
Name | Description |
input_date_time | [DateTime] Datetime you like to convert to UTC date |
Examples:
Example | Sample Output | Description |
<<2021-01-01,FUN_TO_UTC_DATE>> | 2020-12-31 | Updated date after converting local time to UTC (+5:00 timezone converted to UTC) |
FUN_TO_UTC_DATETIME
Syntax:
<<input_date_time,FUN_TO_UTC_DATETIME>>
Converts local date to UTC date (after conversion time portion is removed)
Parameters:
Name | Description |
input_date_time | [String] Datetime you like to convert to UTC date |
Examples:
Example | Sample Output | Description |
<<2020-12-31T23:00:00,FUN_TO_UTC_DATETIME>> | 2021-01-01T04:00:00Z | Example of time conversion to UTC for -5:00 timezone |
<<2021-01-01T00:00:00,FUN_TO_UTC_DATETIME>> | 2020-12-31T20:00:00Z | Example of time conversion to UTC for +5:00 timezone |
<<2021-01-01,FUN_TO_UTC_DATETIME>> | 2021-01-01T05:00:00Z | Example of time conversion to UTC for -5:00 timezone (EST) |
FUN_TO_LOCAL_DATE
Syntax:
<<input_date_time,FUN_TO_LOCAL_DATE>>
Converts UTC datetime to local datetime based on current system timezone (after conversion time portion is removed)
Parameters:
Name | Description |
input_date_time | [String] Datetime you like to convert to UTC date |
Examples:
Example | Sample Output | Description |
<<2020-12-31T23:00:00,FUN_TO_LOCAL_DATE>> | 2021-01-01 | Example of time conversion to UTC for -5:00 timezone |
<<2021-01-01T00:00:00,FUN_TO_LOCAL_DATE>> | 2020-12-31 | Example of time conversion to UTC for +5:00 timezone |
<<2021-01-01,FUN_TO_LOCAL_DATE>> | 2020-12-31 | Example of time conversion to UTC for +5:00 timezone |
FUN_TO_LOCAL_DATETIME
Syntax:
<<input_date_time,FUN_TO_LOCAL_DATETIME>>
Converts UTC datetime to local datetime (based on current system timezone)
Parameters:
Name | Description |
input_date_time | [String] UTC Datetime you like to convert to local time |
Examples:
Example | Sample Output | Description |
<<2020-12-31T23:00:00,FUN_TO_LOCAL_DATETIME>> | 2021-01-01T04:00:00 | Example of time conversion to UTC for -5:00 timezone |
<<2021-01-01T00:00:00,FUN_TO_LOCAL_DATETIME>> | 2020-12-31T20:00:00 | Example of time conversion to UTC for +5:00 timezone |
<<2021-01-01,FUN_TO_LOCAL_DATETIME>> | 2020-12-31 | Example of time conversion to UTC for +5:00 timezone |
FUN_TIMESTAMP_UNIX
Syntax:
<<[input_date_time],FUN_TIMESTAMP_UNIX>>
Converts date/time to Unix TimeStamp which is integer number which represents number of seconds that have passed since January 1, 1970 (the birth of Unix a.k.a. the Unix epoch)
Parameters:
Name | Description |
input_date_time (Optional) | [DateTime] Input date/time which you like to convert to Unix Timestamp |
Examples:
Example | Sample Output | Description |
<<FUN_TIMESTAMP_UNIX>> | 1615225833 (assuming System Clock was 2021-03-08T12:50:33 EST -5:00) | Unix Timestamp generated based on current time |
<<2020-01-01T00:00:00,FUN_TIMESTAMP_UNIX>> | 1577854800 | Unix Timestamp is generated for user defined date time (System setting EST -5:00 timezone). By default input date is treated as Local time so its always converted to UTC before generating Timestamp. |
<<2020-01-01,FUN_TIMESTAMP_UNIX>> | 1577854800 | Unix Timestamp is generated for user defined date time (System setting EST -5:00 timezone). Only date supplied (Time part is 00:00:00) |
<<2020-01-01T00:00:00Z,FUN_TIMESTAMP_UNIX>> | 1577836800 | Unix Timestamp is generated for user defined date time which is marked as UTC date (Z suffix at the end). |
FUN_TIMESTAMP_MS_UNIX
Syntax:
<<[input_date_time],FUN_TIMESTAMP_MS_UNIX>>
Converts date/time to Unix TimeStamp which is integer number which represents number of milliseconds that have passed since January 1, 1970 (the birth of Unix a.k.a. the Unix epoch)
Parameters:
Name | Description |
input_date_time (Optional) | [DateTime] Input date/time which you like to convert to Unix Timestamp |
Examples:
Example | Sample Output | Description |
<<FUN_TIMESTAMP_MS_UNIX>> | 1577905199123 (assuming System Clock was 2020-01-01T13:59:59.123 EST -5:00) | Unix Timestamp generated based on current time |
<<2020-01-01T13:59:59.123,FUN_TIMESTAMP_MS_UNIX>> | 1577941199123 | Unix Timestamp is generated for user defined date time (System setting EST -5:00 timezone). By default input date is treated as Local time so its always converted to UTC before generating Timestamp. |
<<2020-01-01,FUN_TIMESTAMP_MS_UNIX>> | 1577854800000 | Unix Timestamp is generated for user defined date time (System setting EST -5:00 timezone). Only date supplied (Time part is 00:00:00) |
<<2020-01-01T13:59:59.123Z,FUN_TIMESTAMP_MS_UNIX>> | 1577887199123 | Unix Timestamp is generated for user defined date time which is marked as UTC date (Z suffix at the end). |
FUN_UNIX_TIMESTAMP_TO_DATE
Syntax:
<<input_unix_timestamp,FUN_UNIX_TIMESTAMP_TO_DATE>>
Converts Unix TimeStamp format to UTC date/time
Parameters:
Name | Description |
input_unix_timestamp | [Int32] Input Unix timestamp which you like to convert to datetime |
Examples:
Example | Sample Output | Description |
<<1615225833,FUN_UNIX_TIMESTAMP_TO_DATE>> | 2021-03-08T17:50:33 | |
FUN_UNIX_TIMESTAMP_MS_TO_DATE
Syntax:
<<input_unix_timestamp,FUN_UNIX_TIMESTAMP_MS_TO_DATE>>
Converts Unix TimeStamp format to UTC date/time
Parameters:
Name | Description |
input_unix_timestamp | [Int64] Input Unix timestamp which you like to convert to datetime |
Examples:
Example | Sample Output | Description |
<<1577941199123,FUN_UNIX_TIMESTAMP_MS_TO_DATE>> | 2020-01-02T04:59:59.123 | |
String Functions
FUN_TRIM
Syntax:
This function trims white spaces (i.e. new line, tab, spaces) around input string.
Parameters:
Name | Description |
input_text | [String] Input string which you want to trim. |
Examples:
Example | Sample Output | Description |
<< ABCD ,FUN_TRIM>> | ABCD | |
<<ABCD ,FUN_TRIM>> | ABCD | |
FUN_TRIM_QUOTES
Syntax:
<<input_text,FUN_TRIM_QUOTES>>
This function trims single and double quotes around input string.
Parameters:
Name | Description |
input_text | [String] Input string for which you want to trim quotes. |
Examples:
Example | Sample Output | Description |
<<'ABCD',FUN_TRIM_QUOTES>> | ABCD | Trim single quotes |
<<"ABCD",FUN_TRIM_QUOTES>> | ABCD | Trim double quotes |
<<"'ABCD'",FUN_TRIM_QUOTES>> | ABCD | Trim single and double quotes |
<<"""ABCD""",FUN_TRIM_QUOTES>> | ABCD | Trim many quotes |
<< """ABCD""" ,FUN_TRIM_QUOTES>> | """ABCD""" | No trimming because non quote character (i.e. space in this case) found before first quote |
FUN_UPPER
Syntax:
This function returns upper case string.
Parameters:
Name | Description |
input_text | [String] Input string which you want to change to upper case. |
Examples:
Example | Sample Output | Description |
<<AbCd,FUN_UPPER>> | ABCD | |
FUN_LOWER
Syntax:
This function returns lower case string.
Parameters:
Name | Description |
input_text | [String] Input string which you want to change to lower case. |
Examples:
Example | Sample Output | Description |
<<AbCd,FUN_LOWER>> | abcd | |
FUN_REPLACE
Syntax:
<<input_text|~|search_for|~|replace_with|~|is_case_sensitive,FUN_REPLACE>>
Search for sub string and returns a new string with replaced value
Parameters:
Name | Description |
input_text | [String] The string to be replaced. |
search_for | [String] Sub string to be search for. |
replace_with | [String] New string value you like to replace. |
is_case_sensitive | [String] Specifies whether search pattern is case sensitive or not. 1 or True=Case-Sensitive search, 0 or False=Case-insensitive (Default=0) |
Examples:
Example | Sample Output | Description |
<<I like Cap|~|Cap|~|Hat,FUN_REPLACE>> | I like Hat | In this example word "Cap" is replaced by "Hat" |
FUN_IF_NULL
Syntax:
<<input_text|~|match_text[|~|not_match_text][|~|encode_function],FUN_IF_NULL>>
Returns custom string if input value is null else different string with value template (use $1 to reference input value in the return template)
Parameters:
Name | Description |
input_text | [String] Input string to check. |
match_text | [String] String you like to output if input is null. |
not_match_text (Optional) | [String] Custom string you like to return if input is not null. You can use $1 any where in the string to reference input in this custom string. If omitted then input value is returned. |
encode_function (Optional) | [String] Operation you like to perform on the input value before using in the custom_text. Possible functions are jsonenc, xmlenc, quote, base64enc (for string encoding) and jsondec, xmldec, base64dec for decoding. You can suffix "_w_quote" after operation name to quote around (i.e. jsonenc_w_quote) |
Examples:
Example | Sample Output | Description |
<<I like M & M|~|--null--|~|You entered: $1,FUN_IF_NULL>> | You entered: I like M & M | In this example we used custom output if value is not null. Notice $1 is used to refer input string for custom_text |
<<I like M & M|~|--null--|~|You entered: $1|~|xmlenc,FUN_IF_NULL>> | You entered: I like M & M | In this example we used xmlenc operation (XML Encode function) for input string. It gets applied before custom_text is returned if value is not null. |
FUN_IF_EMPTY
Syntax:
<<input_text|~|match_text[|~|not_match_text][|~|encode_function],FUN_IF_EMPTY>>
Returns custom string if input value is empty (blank string) else different string with value template (use $1 to reference input value in the return template)
Parameters:
Name | Description |
input_text | [String] Input string to check. |
match_text | [String] String you like to output if input is empty string. |
not_match_text (Optional) | [String] Custom string you like to return if input is not empty. You can use $1 any where in the string to reference input in this custom string. If omitted then input value is returned. |
encode_function (Optional) | [String] Operation you like to perform on the input value before using in the custom_text. Possible functions are jsonenc, xmlenc, quote, base64enc (for string encoding) and jsondec, xmldec, base64dec for decoding. You can suffix "_w_quote" after operation name to quote around (i.e. jsonenc_w_quote) |
Examples:
Example | Sample Output | Description |
<<I like M & M|~|--empty--|~|You entered: $1,FUN_IF_EMPTY>> | You entered: I like M & M | In this example we used custom output if value is not empty string. Notice $1 is used to refer input string for custom_text |
<<|~|--empty--|~|You entered: $1,FUN_IF_EMPTY>> | --empty-- | In this example our output is custom string set for null (i.e. --null--) because input is Blank string (i.e. empty) value |
<<I like M & M|~|--empty--|~|You entered: $1|~|xmlenc,FUN_IF_EMPTY>> | You entered: I like M & M | In this example we used xmlenc operation (XML Encode function) for input string. It gets applied before custom_text is returned if value is not empty string. |
FUN_IF_NULL_OR_EMPTY
Syntax:
<<input_text|~|match_text[|~|not_match_text][|~|encode_function],FUN_IF_NULL_OR_EMPTY>>
Returns custom string if input value is null or empty else different string with value template (use $1 to reference input value in the return template)
Parameters:
Name | Description |
input_text | [String] Input string to check. |
match_text | [String] String you like to output if input is null or empty. |
not_match_text (Optional) | [String] Custom string you like to return if input is not null or empty. You can use $1 any where in the string to reference input in this custom string. If omitted then input value is returned. |
encode_function (Optional) | [String] Operation you like to perform on the input value before using in the custom_text. Possible functions are jsonenc, xmlenc, quote, base64enc (for string encoding) and jsondec, xmldec, base64dec for decoding. You can suffix "_w_quote" after operation name to quote around (i.e. jsonenc_w_quote) |
Examples:
Example | Sample Output | Description |
<<I like M & M|~|--null-or-empty--|~|You entered: $1,FUN_IF_NULL_OR_EMPTY>> | You entered: I like M & M | In this example we used custom output if value is not null. Notice $1 is used to refer input string for custom_text |
<<|~|--null-or-empty--|~|You entered: $1,FUN_IF_NULL_OR_EMPTY>> | --null-or-empty-- | In this example our output is custom string set for null/empty (i.e. --null-or-empty--) because input is NULL value |
<<<NULL>|~|--null-or-empty--|~|You entered: $1,FUN_IF_NULL_OR_EMPTY>> | --null-or-empty-- | In this example our output is custom string set for null/empty (i.e. --null-or-empty--) because input is NULL value |
<<I like M & M|~|--null-or-empty--|~|You entered: $1|~|xmlenc,FUN_IF_NULL_OR_EMPTY>> | You entered: I like M & M | In this example we used xmlenc operation (XML Encode function) for input string. It gets applied before custom_text is returned if value is not null. |
FUN_REGEX_REPLACE
Syntax:
<<input_text|~|search_pattern|~|replace_with[|~|is_case_sensitive],FUN_REGEX_REPLACE>>
Search for string pattern using Regular expression and returns a new string with replaced value
Parameters:
Name | Description |
input_text | [String] The string to be replaced. |
search_pattern | [String] Regular expression pattern you like to search for. |
replace_with | [String] New string value you like to replace. |
is_case_sensitive (Optional) | [Boolean] Specifies whether search pattern is case sensitive or not. 1=Case-Sensitive search (Default=false) |
Examples:
Example | Sample Output | Description |
<<I like Cap0-red and Cap1-blue|~|Cap(\d+)-(\w+)|~|Hat$1-$2,FUN_REGEX_REPLACE>> | I like Hat0-red and Hat1-blue | You can use $1, $2...as Group indicator to extract sub values from pattern search. $1 represents first group (\d+) for cap number and $2 represents (\w+) for color |
<<I like CAP0-red and cap1-blue|~|CaP(\d+)-(\w+)|~|Hat$1-$2|~|1,FUN_REGEX_REPLACE>> | I like Hat0-red and Hat1-blue | Example of Case-Insensitive search. See last parameter is 1 rather than default 0 |
FUN_REGEX_EXTRACT
Syntax:
<<input_text|~|search_pattern[|~|is_case_sensitive][|~|is_required],FUN_REGEX_EXTRACT>>
Returns string match using Regular expression
Parameters:
Name | Description |
input_text | [String] The string to be replaced. |
search_pattern | [String] Regular expression pattern you like to search for. |
is_case_sensitive (Optional) | [Boolean] Specifies whether search pattern is case sensitive or not. 1=Case-Sensitive search (Default=false) |
is_required (Optional) | [Boolean] Indicates whether it should throws error if search pattern not found. BY default it returns blank string if pattern not found. |
Examples:
Example | Sample Output | Description |
<<I like Cap0-red and Cap1-blue|~|Cap(\d+)-(\w+),FUN_REGEX_EXTRACT>> | Cap0-red | Extracts first match from input text |
<<I like Cap0-red and Cap1-blue|~|Cap(\d+)-(\w+){{*}},FUN_REGEX_EXTRACT>> | Cap0-red Cap1-blue | Extracts all matches from input text (each match is separated by new line) |
<<I like Cap0-red and Cap1-blue|~|Cap(\d+)-(\w+){{-0,2}},FUN_REGEX_EXTRACT>> | blue | Extracts 2nd part (i.e. color) of last match from input text |
<<I like Cap0-red and Cap1-blue|~|Cap(\d+)-(\w+){{0,2}},FUN_REGEX_EXTRACT>> | red | Extracts 2nd part (i.e. color) of first match from input text |
<<I like Cap0-red and Cap1-blue|~|Cap(\d+)-(\w+){{*,2}},FUN_REGEX_EXTRACT>> | red blue | Extracts 2nd part (i.e. color) of all matches (i.e. color) from input text (each match is separated by new line) |
FUN_JSON_TO_TEXT
Syntax:
<<input_json|~|json_path[|~|separator],FUN_JSON_TO_TEXT>>
Extracts Text from JSON array using JSON Path expression. You can specify expression like $.data[*] or $.data[*].email. If document is Array (i.e. starts with [ ) then root is referred as $.data[*]
Parameters:
Name | Description |
input_json | [String] JSON document from which you like to extract text. |
json_path | [String] JSONPath Filter expression you like to extract |
separator (Optional) | [String] String to use as separator to join multiple matches. You may use \r (carriage return),\n (linefeed),\r\n (newline),\t (tab) Default={space} |
Examples:
Example | Sample Output | Description |
<<['A','B','C']|~|$.data[*],FUN_JSON_TO_TEXT>> | A B C | |
<<['A','B','C']|~|$.data[*]|~|;,FUN_JSON_TO_TEXT>> | A;B;C | |
<<['A','B','C']|~|$.data[*]|~|\n,FUN_JSON_TO_TEXT>> | A B C | |
<<[{id:'A'},{id:'B'},{id:'C'}]|~|$.data[*].id|~|\n,FUN_JSON_TO_TEXT>> | A B C | |
FUN_RANDOM_STR
Syntax:
<<[max_length],FUN_RANDOM_STR>>
Generates a random string
Parameters:
Name | Description |
max_length (Optional) | [String] Maximum number of characters. Default=10 |
Examples:
Example | Sample Output | Description |
<<FUN_RANDOM_STR>> | Asdhs^&jhd | Generate a random string (upto 10 characters by default) |
<<4,FUN_RANDOM_STR>> | As#1 | Generate a random string upto 4 characters |
MD5 Functions
FUN_MD5
Syntax:
Returns MD5 hash in Base64 format for specified input
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_MD5>> | u/LerTdGVMuzKpF6/SNmVg== | MD5 Hash of string containing upper case and numbers |
<<abc123,FUN_MD5>> | 6ZoYxCjLONXyYIU2eJIuAw== | MD5 Hash of string containing lower case and numbers |
<<FUN_MD5>> | 1B2M2Y8AsgTpgAmY7PhCfg== | MD5 Hash of blank string |
FUN_MD5HEX
Syntax:
<<input_string,FUN_MD5HEX>>
Returns MD5 hash in Hex format (all Uppercase). To output Hash in base64 use FUN_MD5. To output Hash in lowercase format use FUN_HASH_MD5_HEX
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_MD5HEX>> | BBF2DEAD374654CBB32A917AFD236656 | MD5 Hash (in Hex format) of string containing upper case and numbers |
<<abc123,FUN_MD5HEX>> | E99A18C428CB38D5F260853678922E03 | MD5 Hash (in Hex format) of string containing lower case and numbers |
<<FUN_MD5HEX>> | D41D8CD98F00B204E9800998ECF8427E | MD5 Hash (in Hex format) of blank string |
FUN_FILE_MD5
Syntax:
<<file_path,FUN_FILE_MD5>>
Returns File content MD5 hash in Base64 format for a specified file path. File content can be text or binary.
Parameters:
Name | Description |
file_path | [String] File path for which you like to calculate MD5 hash (path can be for text or binary data file - txt, json, exe, png, zip) |
Examples:
Example | Sample Output | Description |
<<c:\data.txt,FUN_FILE_MD5>> | u/LerTdGVMuzKpF6/SNmVg== | MD5 Hash of a ASCII file. Where file content is [ABC123]. |
<<c:\data.txt,FUN_FILE_MD5>> | RoU9p6cBAq/t5ApxY9ADMQ== | MD5 Hash of a UTF8 file (with BOM). Where file content is [ABC123]. |
FUN_FILE_MD5HEX
Syntax:
<<file_path,FUN_FILE_MD5HEX>>
Returns File content MD5 hash in Hex format (rather than Base64) for a specified file path. File content can be text or binary.
Parameters:
Name | Description |
file_path | [String] File path for which you like to calculate MD5 hash (path can be for text or binary data file - txt, json, exe, png, zip) |
Examples:
Example | Sample Output | Description |
<<c:\data.txt,FUN_FILE_MD5HEX>> | BBF2DEAD374654CBB32A917AFD236656 | MD5 Hash of a ASCII file. Where file content is [ABC123]. |
<<c:\data.txt,FUN_FILE_MD5HEX>> | 46853DA7A70102AFEDE40A7163D00331 | MD5 Hash of a UTF8 file (with BOM). Where file content is [ABC123]. |
File Functions
FUN_FILE_NAME
Syntax:
<<file_path,FUN_FILE_NAME>>
Returns file name from the input file path.
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_NAME>> | file1.txt | Returns file name from full path |
<<c:\somefolder\file1,FUN_FILE_NAME>> | file1 | Returns file name from full path (extension less file name example) |
<<c:\somefolder\,FUN_FILE_NAME>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_SIZE
Syntax:
<<file_path_or_pattern,FUN_FILE_SIZE>>
Returns file size (in bytes) for a single file or multiple files using wildcard pattern match.
Parameters:
Name | Description |
file_path_or_pattern | [String] Full file path or wildcard pattern to calculate file size. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_SIZE>> | 1024 | Returns file size for a single file (e.g. for a 1KB file it returns 1024) |
<<c:\somefolder\file*.*,FUN_FILE_SIZE>> | 2048 | Returns file size for multiple files using wildcard pattern. |
<<c:\somefolder\,FUN_FILE_SIZE>> | Error | Bad path example. Path must be a valid file path or pattern (cannot end with / or \) |
FUN_FILE_SIZE_RECURSIVE
Syntax:
<<file_path_or_pattern,FUN_FILE_SIZE_RECURSIVE>>
Returns file size (in bytes) for a single file or multiple files using wildcard pattern match. This function scans child folders too for wildcard pattern search.
Parameters:
Name | Description |
file_path_or_pattern | [String] Full file path or wildcard pattern to calculate file size. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_SIZE_RECURSIVE>> | 1024 | Returns file size for a single file (e.g. for a 1KB file it returns 1024) |
<<c:\somefolder\file*.*,FUN_FILE_SIZE_RECURSIVE>> | 2048 | Returns file size for multiple files using wildcard pattern. |
<<c:\somefolder\,FUN_FILE_SIZE_RECURSIVE>> | Error | Bad path example. Path must be a valid file path or pattern (cannot end with / or \) |
FUN_FILE_COUNT
Syntax:
<<file_path_pattern,FUN_FILE_COUNT>>
Returns total file count for a given wildcard pattern match.
Parameters:
Name | Description |
file_path_pattern | [String] Full file path with wildcard pattern to search for. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file*.*,FUN_FILE_COUNT>> | 2 | Returns file count for multiple files using wildcard pattern. |
<<c:\somefolder\,FUN_FILE_COUNT>> | Error | Bad path example. Path must be a valid file path or pattern (cannot end with / or \) |
FUN_FILE_COUNT_RECURSIVE
Syntax:
<<file_path_pattern,FUN_FILE_COUNT_RECURSIVE>>
Returns total file count for a given wildcard pattern match. This function scans child folders too for wildcard pattern search.
Parameters:
Name | Description |
file_path_pattern | [String] Full file path with wildcard pattern to search for. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file*.*,FUN_FILE_COUNT_RECURSIVE>> | 2 | Returns file count for multiple files using wildcard pattern. |
<<c:\somefolder\,FUN_FILE_COUNT_RECURSIVE>> | Error | Bad path example. Path must be a valid file path or pattern (cannot end with / or \) |
FUN_FILE_EXITS
Syntax:
<<file_path_or_pattern,FUN_FILE_EXITS>>
Returns file(s) exists status (True or False) for a single file or multiple files using wildcard pattern match.
Parameters:
Name | Description |
file_path_or_pattern | [String] Full file path or wildcard pattern to calculate file size. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_EXITS>> | True | Returns file exists status (True if file found else returns False) |
<<c:\somefolder\file*.*,FUN_FILE_EXITS>> | True | Returns file exists status for multiple files using wildcard pattern search. Returns True if atleast one file found for a given pattern. |
<<c:\somefolder\,FUN_FILE_EXITS>> | Error | Bad path example. Path must be a valid file path or pattern (cannot end with / or \) |
FUN_FILE_EXITS_RECURSIVE
Syntax:
<<file_path_or_pattern,FUN_FILE_EXITS_RECURSIVE>>
Returns file(s) exists status (True or False) for a single file or multiple files using wildcard pattern match. This function scans child folders too for wildcard pattern search.
Parameters:
Name | Description |
file_path_or_pattern | [String] Full file path or wildcard pattern to calculate file size. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_EXITS_RECURSIVE>> | True | Returns file exists status (True if file found else returns False) |
<<c:\somefolder\file*.*,FUN_FILE_EXITS_RECURSIVE>> | True | Returns file exists status for multiple files using wildcard pattern search. Returns True if atleast one file found for a given pattern. |
<<c:\somefolder\,FUN_FILE_EXITS_RECURSIVE>> | Error | Bad path example. Path must be a valid file path or pattern (cannot end with / or \) |
FUN_FILE_EXTENSION
Syntax:
<<file_name_or_path,FUN_FILE_EXTENSION>>
Returns file extension for a given file path.
Parameters:
Name | Description |
file_name_or_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<file1.txt,FUN_FILE_EXTENSION>> | .txt | Returns file extension from a file name |
<<c:\somefolder\file1.txt,FUN_FILE_EXTENSION>> | .txt | Returns file extension from a full file path |
<<c:\somefolder\,FUN_FILE_EXTENSION>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_ENCODING
Syntax:
<<file_path,FUN_FILE_ENCODING>>
Returns encoding type from the input file path. Possible return values are: ASCII, UTF8, UTF8WithoutBOM, UTF16, UTF16WithoutBOM, UTF32, UTF32WithoutBOM, UTF7, UTF7WithoutBOM, BigEndian, BigEndianWithoutBOM
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_ENCODING>> | UTF8 | Returns encoding for UTF-8 file |
<<c:\somefolder\file1.txt,FUN_FILE_ENCODING>> | UTF8WithoutBOM | Returns encoding for UTF-8 file without BOM (i.e. Byte-Order-Mark) |
<<c:\somefolder\,FUN_FILE_ENCODING>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_ISLOCKED
Syntax:
<<file_path,FUN_FILE_ISLOCKED>>
Returns lock status (True or False) from the input file path. If Some Program is locking file then returns True else False.
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.xlsx,FUN_FILE_ISLOCKED>> | True | Returns true if file is being locked by some program. |
<<c:\somefolder\,FUN_FILE_ISLOCKED>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_DIRECTORY
Syntax:
<<file_path,FUN_FILE_DIRECTORY>>
Returns directory name for a given file path.
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_DIRECTORY>> | somefolder | Returns folder name of a file path |
<<c:\somefolder\file1_no_extension,FUN_FILE_DIRECTORY>> | somefolder | Returns folder name of a file path |
<<c:\somefolder\,FUN_FILE_DIRECTORY>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_AGE_CREATE
Syntax:
<<file_path,FUN_FILE_AGE_CREATE>>
Returns file age in days based on CreationDate of the file. (e.g. If file was created 5 days ago then it returns 5).
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_AGE_CREATE>> | 5 | In this example file was created 5 days ago so returns 5 |
<<c:\somefolder\,FUN_FILE_AGE_CREATE>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_AGE_LASTEDIT
Syntax:
<<file_path,FUN_FILE_AGE_LASTEDIT>>
Returns file age in days based on LastModifiedDate of the file. (e.g. If file was edited 5 days ago then it returns 5).
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_AGE_LASTEDIT>> | 5 | In this example file was edited 5 days ago so returns 5 |
<<c:\somefolder\,FUN_FILE_AGE_LASTEDIT>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_CREATE_DATE
Syntax:
<<file_path,FUN_FILE_CREATE_DATE>>
Returns file creation date in ISO date format (i.e. 2021-12-31T23:59:59.123).
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_CREATE_DATE>> | 2021-12-31T23:59:59.123 | Returns file create date including time upto 3 digits milliseconds |
FUN_FILE_LASTEDIT_DATE
Syntax:
<<file_path,FUN_FILE_LASTEDIT_DATE>>
Returns file last edit date in ISO date format (i.e. 2021-12-31T23:59:59.123).
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_LASTEDIT_DATE>> | 2021-12-31T23:59:59.123 | Returns file last edit date including time upto 3 digits milliseconds |
FUN_FILE_BASE64ENC
Syntax:
<<file_path,FUN_FILE_BASE64ENC>>
Returns BASE64 encoded string of local file content (binary or text).
Parameters:
Name | Description |
file_path | [String] File path for which you like encode content as Base64. |
Examples:
Example | Sample Output | Description |
<<c:\someimage.png,FUN_FILE_BASE64ENC>> | bXl1c2V..........Ac3NXb3Jk | This returns base64 encoded string of binary file (png) |
FUN_FILE_NAME
Syntax:
<<file_path,FUN_FILE_NAME>>
Returns file name from the input file path.
Parameters:
Name | Description |
file_path | [String] Full path to a file. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder\file1.txt,FUN_FILE_NAME>> | file1.txt | Returns file name from full path |
<<c:\somefolder\file1,FUN_FILE_NAME>> | file1 | Returns file name from full path (extension less file name example) |
<<c:\somefolder\,FUN_FILE_NAME>> | Error | Bad path example. Path must be a valid file path (cannot end with / or \) |
FUN_FILE_READ
Syntax:
<<file_path,FUN_FILE_READ>>
Reads local file and returns content as string
Parameters:
Name | Description |
file_path | [String] Input file path from which you like to read content as text. |
Examples:
Example | Sample Output | Description |
<<C:\file.txt,FUN_FILE_READ>> | Some data from file | |
<<\\mysharedfolder\file.txt,FUN_FILE_READ>> | Some data from file | |
FUN_FILE_WRITE
Syntax:
<<file_path|~|content|~|overwrite|~|append|~|create_target_folder_if_missing|~|encoding,FUN_FILE_WRITE>>
Write content to a file. Returns file size if successful. If its append mode then returns appended text length.
Parameters:
Name | Description |
file_path | [String] Target file path where you like to write text data. |
content | [String] Text you want to write to the file. |
overwrite | [String] Overwrite if file already exits If file exists? (Default=False i.e. Do not overwrite if file already found and throw error) |
append | [String] Append data to file (Default=false) |
create_target_folder_if_missing | [String] Create Target Folder if not found before creating a file. (Default=false) |
encoding | [String] Encoding for a new file to be created. Possible values are: ASCII, UTF8, UTF8WithoutBOM, UTF16, UTF16WithoutBOM, UTF32, UTF32WithoutBOM, UTF7, UTF7WithoutBOM, BigEndian, BigEndianWithoutBOM. Default=UTF8 |
Examples:
Example | Sample Output | Description |
<<C:\file.txt|~|Abcd1234,FUN_FILE_WRITE>> | 11 | Writes some data to file (Default - fail if file exists). Returns file size. |
<<C:\file.txt|~|Abcd1234|~|True,FUN_FILE_WRITE>> | 11 | Overwrite if file exists. |
<<C:\file.txt|~|Abcd1234|~|True|~|True,FUN_FILE_WRITE>> | 11 | Append data to file (along with Overwrite=True) |
<<C:\file.txt|~|Abcd1234|~|True|~|True|~|True,FUN_FILE_WRITE>> | 11 | Create Target folder if not found (along with Overwrite=True, Append=True). |
<<C:\file.txt|~|Abcd1234|~|True|~|True|~|True|~|ASCII,FUN_FILE_WRITE>> | 8 | Set file encoding (along with Overwrite=True, Append=True, CreateTargetFolder=True). |
FUN_FILE_WRITE_BINARY
Syntax:
<<file_path|~|content_base64|~|overwrite|~|append|~|create_target_folder_if_missing,FUN_FILE_WRITE_BINARY>>
Write content to a file (bytes in BASE64 format). Returns file size if successful. If its append mode then returns appended byte array size.
Parameters:
Name | Description |
file_path | [String] Target file path where you like to write binary data. |
content_base64 | [String] Data you want to write to the file (Data must be in base64 format. It can be text or byte array - convert to base64 and pass as content to write). |
overwrite | [String] Overwrite if file already exits If file exists? (Default=False i.e. Do not overwrite if file already found and throw error) |
append | [String] Append data to file (Default=false) |
create_target_folder_if_missing | [String] Create Target Folder if not found before creating a file. (Default=false) |
Examples:
Example | Sample Output | Description |
<<C:\file.txt|~|VGVzdDEyMw==,FUN_FILE_WRITE_BINARY>> | 8 | Writes some data (i.e. Abcd1234 in this example) to a file. Lets say you like to write Abcd1234 to a file then convert data to Base64 which is VGVzdDEyMw== and pass as input. You can convert Byte array as base64 too. (Default - fail if file exists). Returns file size. |
<<C:\file.txt|~|VGVzdDEyMw==|~|True,FUN_FILE_WRITE_BINARY>> | 8 | Overwrite if file exists. |
<<C:\file.txt|~|VGVzdDEyMw==|~|True|~|True,FUN_FILE_WRITE_BINARY>> | 8 | Append data to a file (along with Overwrite=True) |
<<C:\file.txt|~|VGVzdDEyMw==|~|True|~|True|~|True,FUN_FILE_WRITE_BINARY>> | 8 | Create Target folder if not found (along with Overwrite=True, Append=True). |
Folder Functions
FUN_FOLDER_NAME
Syntax:
<<folder_path,FUN_FOLDER_NAME>>
Returns folder name from the path.
Parameters:
Name | Description |
folder_path | [String] Full path to a folder. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder,FUN_FOLDER_NAME>> | somefolder | Returns folder name from a full path |
<<c:\somefolder\,FUN_FOLDER_NAME>> | somefolder | Returns folder name from a full path (ending with slash) |
FUN_FOLDER_SIZE
Syntax:
<<folder_path,FUN_FOLDER_SIZE>>
Returns folder size in bytes (including files from sub folders).
Parameters:
Name | Description |
folder_path | [String] Full folder path to calculate size. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder,FUN_FOLDER_SIZE>> | 1024 | Returns size for a folder including subfolders if any |
FUN_FOLDER_EXITS
Syntax:
<<folder_path,FUN_FOLDER_EXITS>>
Returns folder exists status (True or False).
Parameters:
Name | Description |
folder_path | [String] Full path for a folder. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder,FUN_FOLDER_EXITS>> | True | Returns folder exists status (True if found else returns False) |
FUN_FOLDER_FILECOUNT
Syntax:
<<folder_path,FUN_FOLDER_FILECOUNT>>
Returns file count of a folder (including files from sub folders).
Parameters:
Name | Description |
folder_path | [String] Folder path to count files. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder,FUN_FOLDER_FILECOUNT>> | 3 | Returns total file count for a folder (including subfolders files if any) |
FUN_FOLDER_AGE_CREATE
Syntax:
<<folder_path,FUN_FOLDER_AGE_CREATE>>
Returns folder age in days based on CreationDate of the folder. (e.g. If folder was created 5 days ago then it returns 5).
Parameters:
Name | Description |
folder_path | [String] Full path to a folder. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder,FUN_FOLDER_AGE_CREATE>> | 5 | In this example folder was created 5 days ago so returns 5 |
FUN_FOLDER_CREATE_DATE
Syntax:
<<folder_path,FUN_FOLDER_CREATE_DATE>>
Returns folder creation date in ISO date format (i.e. 2021-12-31T23:59:59.123).
Parameters:
Name | Description |
folder_path | [String] Full path to a folder. |
Examples:
Example | Sample Output | Description |
<<c:\somefolder,FUN_FOLDER_CREATE_DATE>> | 2021-12-31T23:59:59.123 | Returns folder create date including time upto 3 digits milliseconds |
Hash Functions
FUN_HASH_MD5
Syntax:
<<input_string,FUN_HASH_MD5>>
Returns MD5 hash in Base64 format for specified input string
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_MD5>> | ??? | MD5 Hash of string (text: ABC123) in Base64 format |
<<abc123,FUN_HASH_MD5>> | ??? | MD5 Hash of string (text: abc123) in Base64 format |
<<FUN_HASH_MD5>> | ??? | MD5 Hash of blank string in Base64 format |
FUN_HASH_MD5_HEX
Syntax:
<<input_string,FUN_HASH_MD5_HEX>>
Returns MD5 hash in HEX format for specified input string. To output hash in Base64 use HASH_MD5 function.
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_MD5_HEX>> | ??? | MD5 Hash of string (text: ABC123) in HEX format |
<<abc123,FUN_HASH_MD5_HEX>> | ??? | MD5 Hash of string (text: abc123) in HEX format |
<<FUN_HASH_MD5_HEX>> | ??? | MD5 Hash of blank string in HEX format |
FUN_HASH_FILE_MD5
Syntax:
<<input_file,FUN_HASH_FILE_MD5>>
Returns MD5 hash in Base64 format for specified input file
Parameters:
Name | Description |
input_file | [String] Input file you like to hash |
Examples:
Example | Sample Output | Description |
<<c:\data.txt,FUN_HASH_FILE_MD5>> | ??? | MD5 Hash of file (text: ABC123) in Base64 format |
<<c:\data.txt,FUN_HASH_FILE_MD5>> | ??? | MD5 Hash of file (text: abc123) in Base64 format |
<<c:\data.txt,FUN_HASH_FILE_MD5>> | ??? | MD5 Hash of blank file in Base64 format |
FUN_HASH_FILE_MD5_HEX
Syntax:
<<input_file,FUN_HASH_FILE_MD5_HEX>>
Returns MD5 hash in HEX format for specified input file. To output hash in Base64 use HASH_MD5 function.
Parameters:
Name | Description |
input_file | [String] Input file you like to hash |
Examples:
Example | Sample Output | Description |
<<c:\data.txt,FUN_HASH_FILE_MD5_HEX>> | ??? | MD5 Hash of file (text: ABC123) in HEX format |
<<c:\data.txt,FUN_HASH_FILE_MD5_HEX>> | ??? | MD5 Hash of file (text: abc123) in HEX format |
<<c:\data.txt,FUN_HASH_FILE_MD5_HEX>> | ??? | MD5 Hash of blank file in HEX format |
FUN_HASH_SHA1
Syntax:
<<input_string,FUN_HASH_SHA1>>
Returns SHA1 hash in Base64 format for specified input string
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_SHA1>> | ??? | SHA1 Hash of string (text: ABC123) in Base64 format |
<<abc123,FUN_HASH_SHA1>> | ??? | SHA1 Hash of string (text: abc123) in Base64 format |
<<FUN_HASH_SHA1>> | ??? | SHA1 Hash of blank string in Base64 format |
FUN_HASH_SHA1_HEX
Syntax:
<<input_string,FUN_HASH_SHA1_HEX>>
Returns SHA1 hash in HEX format for specified input string. To output hash in Base64 use HASH_SHA1 function.
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_SHA1_HEX>> | ??? | SHA1 Hash of string (text: ABC123) in HEX format |
<<abc123,FUN_HASH_SHA1_HEX>> | ??? | SHA1 Hash of string (text: abc123) in HEX format |
<<FUN_HASH_SHA1_HEX>> | ??? | SHA1 Hash of blank string in HEX format |
FUN_HASH_SHA256
Syntax:
<<input_string,FUN_HASH_SHA256>>
Returns SHA256 hash in Base64 format for specified input string
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_SHA256>> | 4L69IoGZk0JYFIZrYnAeKRnqJvE3BJnBA3tTudScLIo= | SHA256 Hash of string (text: ABC123) in Base64 format |
<<abc123,FUN_HASH_SHA256>> | bKE9UspwyIPg8LsQHkJaiehiTeUdstI5JZOvaoQRgJA= | SHA256 Hash of string (text: abc123) in Base64 format |
<<FUN_HASH_SHA256>> | 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= | SHA256 Hash of blank string in Base64 format |
FUN_HASH_SHA256_HEX
Syntax:
<<input_string,FUN_HASH_SHA256_HEX>>
Returns SHA256 hash in HEX format for specified input string. To output hash in Base64 use HASH_SHA256 function.
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_SHA256_HEX>> | e0bebd22819993425814866b62701e2919ea26f1370499c1037b53b9d49c2c8a | SHA256 Hash of string (text: ABC123) in HEX format |
<<abc123,FUN_HASH_SHA256_HEX>> | 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 | SHA256 Hash of string (text: abc123) in HEX format |
<<FUN_HASH_SHA256_HEX>> | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | SHA256 Hash of blank string in HEX format |
FUN_HASH_FILE_SHA256
Syntax:
<<input_file,FUN_HASH_FILE_SHA256>>
Returns SHA256 hash in Base64 format for specified input file
Parameters:
Name | Description |
input_file | [String] Input file you like to hash |
Examples:
Example | Sample Output | Description |
<<c:\data.txt,FUN_HASH_FILE_SHA256>> | 4L69IoGZk0JYFIZrYnAeKRnqJvE3BJnBA3tTudScLIo= | SHA256 Hash of file (text: ABC123) in Base64 format |
<<c:\data.txt,FUN_HASH_FILE_SHA256>> | bKE9UspwyIPg8LsQHkJaiehiTeUdstI5JZOvaoQRgJA= | SHA256 Hash of file (text: abc123) in Base64 format |
<<c:\data.txt,FUN_HASH_FILE_SHA256>> | 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= | SHA256 Hash of blank file in Base64 format |
FUN_HASH_FILE_SHA256_HEX
Syntax:
<<input_file,FUN_HASH_FILE_SHA256_HEX>>
Returns SHA256 hash in HEX format for specified input file. To output hash in Base64 use HASH_SHA256 function.
Parameters:
Name | Description |
input_file | [String] Input file you like to hash |
Examples:
Example | Sample Output | Description |
<<c:\data.txt,FUN_HASH_FILE_SHA256_HEX>> | e0bebd22819993425814866b62701e2919ea26f1370499c1037b53b9d49c2c8a | SHA256 Hash of file (text: ABC123) in HEX format |
<<c:\data.txt,FUN_HASH_FILE_SHA256_HEX>> | 6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090 | SHA256 Hash of file (text: abc123) in HEX format |
<<c:\data.txt,FUN_HASH_FILE_SHA256_HEX>> | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | SHA256 Hash of blank file in HEX format |
FUN_HASH_SHA512
Syntax:
<<input_string,FUN_HASH_SHA512>>
Returns SHA512 hash in Base64 format for specified input string
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_SHA512>> | ??? | SHA512 Hash of string (text: ABC123) in Base64 format |
<<abc123,FUN_HASH_SHA512>> | ??? | SHA512 Hash of string (text: abc123) in Base64 format |
<<FUN_HASH_SHA512>> | ??? | SHA512 Hash of blank string in Base64 format |
FUN_HASH_SHA512_HEX
Syntax:
<<input_string,FUN_HASH_SHA512_HEX>>
Returns SHA512 hash in HEX format for specified input string. To output hash in Base64 use HASH_SHA512 function.
Parameters:
Name | Description |
input_string | [String] Input string you like to hash |
Examples:
Example | Sample Output | Description |
<<ABC123,FUN_HASH_SHA512_HEX>> | ??? | SHA512 Hash of string (text: ABC123) in HEX format |
<<abc123,FUN_HASH_SHA512_HEX>> | ??? | SHA512 Hash of string (text: abc123) in HEX format |
<<FUN_HASH_SHA512_HEX>> | ??? | SHA512 Hash of blank string in HEX format |
HMAC - Hash + Encryption Functions
FUN_HMAC_MD5
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_MD5>>
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the MD5 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
<<a2V5MTIz||Hi my name is A,FUN_HMAC_MD5>> | EICjBYkqIW6HpU0VOkIABQ== | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. |
<<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_MD5>> | KUcR9yrT/+sUwV/Rlclk4Q== | HMAC for non-base64 secret key (i.e. PassW0rd) and sample input string. Notice we appended --non-base64 after secret key |
<<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_MD5>> | NMWBHrLEeRDlIeSpY0I12A== | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. Notice we used \n after POST and api-key:ABCD12345. Use of \n (line feed) and \r (carriage return) is allowed anywhere in input_string and it will be replaced automatically before calculating Hash. |
FUN_HMAC_SHA1
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA1>>
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA1 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
<<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA1>> | AjySY1u3hiBuWLL7t5HfbwRL8Kk= | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. |
<<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA1>> | jzWyMKjP9uzKkwsBsKUnSEk/uW4= | HMAC for non-base64 secret key (i.e. PassW0rd) and sample input string. Notice we appended --non-base64 after secret key |
<<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA1>> | TLN5p6HKFcIk/5vJbLG9IliO0+g= | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. Notice we used \n after POST and api-key:ABCD12345. Use of \n (line feed) and \r (carriage return) is allowed anywhere in input_string and it will be replaced automatically before calculating Hash. |
FUN_HMAC_SHA256
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA256>>
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
<<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA256>> | +yhBCew33Bbvh+Raumcj7Af3wuNT8pRepT0HfPt+6rg= | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. |
<<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA256>> | C0QsJqJ1ds8vJx5IZIJEkgjA6C1Zx50FUWJzfPW3pOE= | HMAC for non-base64 secret key (i.e. PassW0rd) and sample input string. Notice we appended --non-base64 after secret key |
<<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA256>> | g4RYXElEKkk6M4uODazT0cSuygVcjuh8ycmYIOq5Joc= | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. Notice we used \n after POST and api-key:ABCD12345. Use of \n (line feed) and \r (carriage return) is allowed anywhere in input_string and it will be replaced automatically before calculating Hash. |
FUN_HMAC_SHA384
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA384>>
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA384 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
<<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384>> | //2hiViJ5fY4Mgwa5zUS6L+dEiwr6QcX/WoY6y1hJ8LwKpqABzn9NWD1l08eLdJi | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. |
<<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384>> | 48bA65Om0rFndSa1P2w+2LFgrSTgVAXNCY3Z6Q3+/H9TnMv171zQawrx0n8xLlLp | HMAC for non-base64 secret key (i.e. PassW0rd) and sample input string. Notice we appended --non-base64 after secret key |
<<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384>> | eICuBm1DbsFnk4Ai/qTmy+w5cp2hUZQ6MvNiwZfyS9m93oyaBTNQMI/orrVrpI8i | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. Notice we used \n after POST and api-key:ABCD12345. Use of \n (line feed) and \r (carriage return) is allowed anywhere in input_string and it will be replaced automatically before calculating Hash. |
FUN_HMAC_SHA384
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA384>>
Returns a Base64 string of Hash-based Message Authentication Code (HMAC) by using the SHA512 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
<<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384>> | fdVQbHC5acN+UFoSeWNLEOGtn1Jc3aIEjY97aQ58/EhciNJLxTk+rlX04485OZKLysvbZVNPDLjGz20gvzOwXA== | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. |
<<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384>> | oEKZhescV/0ZHfudwj6PMglEaou3VkbFB2iNXinGmIznQWE552+HfYY3BnBEWy5HJGzndPZmp3hqDtIpQIypZA== | HMAC for non-base64 secret key (i.e. PassW0rd) and sample input string. Notice we appended --non-base64 after secret key |
<<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384>> | smP9CmAo9v5C2oA2lmzLATdaKI06Yxl+LvSURhv/QOTqQ+vGh2wUnynNw5eZuy/S8Z3yGrprc18n/Zo0gP/y7w== | HMAC for base64 secret key (i.e. a2V5MTIz) and sample input string. Notice we used \n after POST and api-key:ABCD12345. Use of \n (line feed) and \r (carriage return) is allowed anywhere in input_string and it will be replaced automatically before calculating Hash. |
FUN_HMAC_MD5_HEX
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_MD5_HEX>>
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the MD5 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
--MD5 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_MD5_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_MD5_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_MD5_HEX>>
--SHA1 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA1_HEX>>
--SHA256 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA256_HEX>>
--SHA384 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384_HEX>>
--SHA512 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA512_HEX>>
| --MD5 Hex-- 1080a305892a216e87a54d153a420005 294711f72ad3ffeb14c15fd195c964e1 34c5811eb2c47910e521e4a9634235d8
--SHA1 Hex-- 023c92635bb786206e58b2fbb791df6f044bf0a9 8f35b230a8cff6ecca930b01b0a52748493fb96e 4cb379a7a1ca15c224ff9bc96cb1bd22588ed3e8
--SHA256 Hex-- fb284109ec37dc16ef87e45aba6723ec07f7c2e353f2945ea53d077cfb7eeab8 0b442c26a27576cf2f271e486482449208c0e82d59c79d055162737cf5b7a4e1 8384585c49442a493a338b8e0dacd3d1c4aeca055c8ee87cc9c99820eab92687
--SHA384 Hex-- fffda1895889e5f638320c1ae73512e8bf9d122c2be90717fd6a18eb2d6127c2f02a9a800739fd3560f5974f1e2dd262 e3c6c0eb93a6d2b1677526b53f6c3ed8b160ad24e05405cd098dd9e90dfefc7f539ccbf5ef5cd06b0af1d27f312e52e9 7880ae066d436ec167938022fea4e6cbec39729da151943a32f362c197f24bd9bdde8c9a053350308fe8aeb56ba48f22
--SHA512 Hex-- 7dd5506c70b969c37e505a1279634b10e1ad9f525cdda2048d8f7b690e7cfc485c88d24bc5393eae55f4e38f3939928bcacbdb65534f0cb8c6cf6d20bf33b05c a0429985eb1c57fd191dfb9dc23e8f3209446a8bb75646c507688d5e29c6988ce7416139e76f877d86370670445b2e47246ce774f666a7786a0ed229408ca964 b263fd0a6028f6fe42da8036966ccb01375a288d3a63197e2ef494461bff40e4ea43ebc6876c149f29cdc39799bb2fd2f19df21aba6b735f27fd9a3480fff2ef
| |
FUN_HMAC_SHA1_HEX
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA1_HEX>>
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA1 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
--MD5 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_MD5_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_MD5_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_MD5_HEX>>
--SHA1 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA1_HEX>>
--SHA256 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA256_HEX>>
--SHA384 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384_HEX>>
--SHA512 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA512_HEX>>
| --MD5 Hex-- 1080a305892a216e87a54d153a420005 294711f72ad3ffeb14c15fd195c964e1 34c5811eb2c47910e521e4a9634235d8
--SHA1 Hex-- 023c92635bb786206e58b2fbb791df6f044bf0a9 8f35b230a8cff6ecca930b01b0a52748493fb96e 4cb379a7a1ca15c224ff9bc96cb1bd22588ed3e8
--SHA256 Hex-- fb284109ec37dc16ef87e45aba6723ec07f7c2e353f2945ea53d077cfb7eeab8 0b442c26a27576cf2f271e486482449208c0e82d59c79d055162737cf5b7a4e1 8384585c49442a493a338b8e0dacd3d1c4aeca055c8ee87cc9c99820eab92687
--SHA384 Hex-- fffda1895889e5f638320c1ae73512e8bf9d122c2be90717fd6a18eb2d6127c2f02a9a800739fd3560f5974f1e2dd262 e3c6c0eb93a6d2b1677526b53f6c3ed8b160ad24e05405cd098dd9e90dfefc7f539ccbf5ef5cd06b0af1d27f312e52e9 7880ae066d436ec167938022fea4e6cbec39729da151943a32f362c197f24bd9bdde8c9a053350308fe8aeb56ba48f22
--SHA512 Hex-- 7dd5506c70b969c37e505a1279634b10e1ad9f525cdda2048d8f7b690e7cfc485c88d24bc5393eae55f4e38f3939928bcacbdb65534f0cb8c6cf6d20bf33b05c a0429985eb1c57fd191dfb9dc23e8f3209446a8bb75646c507688d5e29c6988ce7416139e76f877d86370670445b2e47246ce774f666a7786a0ed229408ca964 b263fd0a6028f6fe42da8036966ccb01375a288d3a63197e2ef494461bff40e4ea43ebc6876c149f29cdc39799bb2fd2f19df21aba6b735f27fd9a3480fff2ef
| |
FUN_HMAC_SHA256_HEX
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA256_HEX>>
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA256 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
--MD5 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_MD5_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_MD5_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_MD5_HEX>>
--SHA1 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA1_HEX>>
--SHA256 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA256_HEX>>
--SHA384 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384_HEX>>
--SHA512 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA512_HEX>>
| --MD5 Hex-- 1080a305892a216e87a54d153a420005 294711f72ad3ffeb14c15fd195c964e1 34c5811eb2c47910e521e4a9634235d8
--SHA1 Hex-- 023c92635bb786206e58b2fbb791df6f044bf0a9 8f35b230a8cff6ecca930b01b0a52748493fb96e 4cb379a7a1ca15c224ff9bc96cb1bd22588ed3e8
--SHA256 Hex-- fb284109ec37dc16ef87e45aba6723ec07f7c2e353f2945ea53d077cfb7eeab8 0b442c26a27576cf2f271e486482449208c0e82d59c79d055162737cf5b7a4e1 8384585c49442a493a338b8e0dacd3d1c4aeca055c8ee87cc9c99820eab92687
--SHA384 Hex-- fffda1895889e5f638320c1ae73512e8bf9d122c2be90717fd6a18eb2d6127c2f02a9a800739fd3560f5974f1e2dd262 e3c6c0eb93a6d2b1677526b53f6c3ed8b160ad24e05405cd098dd9e90dfefc7f539ccbf5ef5cd06b0af1d27f312e52e9 7880ae066d436ec167938022fea4e6cbec39729da151943a32f362c197f24bd9bdde8c9a053350308fe8aeb56ba48f22
--SHA512 Hex-- 7dd5506c70b969c37e505a1279634b10e1ad9f525cdda2048d8f7b690e7cfc485c88d24bc5393eae55f4e38f3939928bcacbdb65534f0cb8c6cf6d20bf33b05c a0429985eb1c57fd191dfb9dc23e8f3209446a8bb75646c507688d5e29c6988ce7416139e76f877d86370670445b2e47246ce774f666a7786a0ed229408ca964 b263fd0a6028f6fe42da8036966ccb01375a288d3a63197e2ef494461bff40e4ea43ebc6876c149f29cdc39799bb2fd2f19df21aba6b735f27fd9a3480fff2ef
| |
FUN_HMAC_SHA384_HEX
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA384_HEX>>
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA384 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
--MD5 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_MD5_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_MD5_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_MD5_HEX>>
--SHA1 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA1_HEX>>
--SHA256 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA256_HEX>>
--SHA384 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384_HEX>>
--SHA512 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA512_HEX>>
| --MD5 Hex-- 1080a305892a216e87a54d153a420005 294711f72ad3ffeb14c15fd195c964e1 34c5811eb2c47910e521e4a9634235d8
--SHA1 Hex-- 023c92635bb786206e58b2fbb791df6f044bf0a9 8f35b230a8cff6ecca930b01b0a52748493fb96e 4cb379a7a1ca15c224ff9bc96cb1bd22588ed3e8
--SHA256 Hex-- fb284109ec37dc16ef87e45aba6723ec07f7c2e353f2945ea53d077cfb7eeab8 0b442c26a27576cf2f271e486482449208c0e82d59c79d055162737cf5b7a4e1 8384585c49442a493a338b8e0dacd3d1c4aeca055c8ee87cc9c99820eab92687
--SHA384 Hex-- fffda1895889e5f638320c1ae73512e8bf9d122c2be90717fd6a18eb2d6127c2f02a9a800739fd3560f5974f1e2dd262 e3c6c0eb93a6d2b1677526b53f6c3ed8b160ad24e05405cd098dd9e90dfefc7f539ccbf5ef5cd06b0af1d27f312e52e9 7880ae066d436ec167938022fea4e6cbec39729da151943a32f362c197f24bd9bdde8c9a053350308fe8aeb56ba48f22
--SHA512 Hex-- 7dd5506c70b969c37e505a1279634b10e1ad9f525cdda2048d8f7b690e7cfc485c88d24bc5393eae55f4e38f3939928bcacbdb65534f0cb8c6cf6d20bf33b05c a0429985eb1c57fd191dfb9dc23e8f3209446a8bb75646c507688d5e29c6988ce7416139e76f877d86370670445b2e47246ce774f666a7786a0ed229408ca964 b263fd0a6028f6fe42da8036966ccb01375a288d3a63197e2ef494461bff40e4ea43ebc6876c149f29cdc39799bb2fd2f19df21aba6b735f27fd9a3480fff2ef
| |
FUN_HMAC_SHA512_HEX
Syntax:
<<secret_key[--non-base64]|~|input_string,FUN_HMAC_SHA512_HEX>>
Returns a HEX string of Hash-based Message Authentication Code (HMAC) by using the SHA512 hash function (Hash input data using user defined secret key)
Parameters:
Name | Description |
secret_key[--non-base64] | [String] Secret Key you like to use to produce hash. Append --non-base64 after secret key if Key is Non-Base64 (i.e. some password which is not Base64) |
input_string | [String] Input string for which you like to produce Hash |
Examples:
Example | Sample Output | Description |
--MD5 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_MD5_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_MD5_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_MD5_HEX>>
--SHA1 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA1_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA1_HEX>>
--SHA256 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA256_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA256_HEX>>
--SHA384 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA384_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA384_HEX>>
--SHA512 Hex-- <<a2V5MTIz||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<PassW0rd--non-base64||Hi my name is A,FUN_HMAC_SHA512_HEX>> <<a2V5MTIz||POST\napi-key:ABCD12345\n/my/api/url,FUN_HMAC_SHA512_HEX>>
| --MD5 Hex-- 1080a305892a216e87a54d153a420005 294711f72ad3ffeb14c15fd195c964e1 34c5811eb2c47910e521e4a9634235d8
--SHA1 Hex-- 023c92635bb786206e58b2fbb791df6f044bf0a9 8f35b230a8cff6ecca930b01b0a52748493fb96e 4cb379a7a1ca15c224ff9bc96cb1bd22588ed3e8
--SHA256 Hex-- fb284109ec37dc16ef87e45aba6723ec07f7c2e353f2945ea53d077cfb7eeab8 0b442c26a27576cf2f271e486482449208c0e82d59c79d055162737cf5b7a4e1 8384585c49442a493a338b8e0dacd3d1c4aeca055c8ee87cc9c99820eab92687
--SHA384 Hex-- fffda1895889e5f638320c1ae73512e8bf9d122c2be90717fd6a18eb2d6127c2f02a9a800739fd3560f5974f1e2dd262 e3c6c0eb93a6d2b1677526b53f6c3ed8b160ad24e05405cd098dd9e90dfefc7f539ccbf5ef5cd06b0af1d27f312e52e9 7880ae066d436ec167938022fea4e6cbec39729da151943a32f362c197f24bd9bdde8c9a053350308fe8aeb56ba48f22
--SHA512 Hex-- 7dd5506c70b969c37e505a1279634b10e1ad9f525cdda2048d8f7b690e7cfc485c88d24bc5393eae55f4e38f3939928bcacbdb65534f0cb8c6cf6d20bf33b05c a0429985eb1c57fd191dfb9dc23e8f3209446a8bb75646c507688d5e29c6988ce7416139e76f877d86370670445b2e47246ce774f666a7786a0ed229408ca964 b263fd0a6028f6fe42da8036966ccb01375a288d3a63197e2ef494461bff40e4ea43ebc6876c149f29cdc39799bb2fd2f19df21aba6b735f27fd9a3480fff2ef
| |
JSON Functions
FUN_JSONENC
Syntax:
<<input_string,FUN_JSONENC>>
Encodes string for JSON value (e.g. {NEWLINE} is replaced to \r\n, double quote to \", {TAB} to \\t )
Parameters:
Name | Description |
input_string | [String] Input string which you like to encode |
Examples:
Example | Sample Output | Description |
<<AAA{NEWLINE}BBB{NEWLINE}CCC,FUN_JSONENC>> | AAA\r\nBBB\r\nCCC | {NEWLINE} is replaced with encoded string \r\n |
<<This is "double quoted" string,FUN_JSONENC>> | This is \"double quoted\" string | Double quote is replaced with encoded string \" |
<<Col1{TAB}Col2,FUN_JSONENC>> | {TAB} character is replaced by \t | |
FUN_JSONDEC
Syntax:
<<input_string,FUN_JSONDEC>>
Decodes JSON string (e.g. \r\n is replaced to {NEWLINE}, \" to double quote, \\t to {TAB})
Parameters:
Name | Description |
input_string | [String] Input string which you like to decode |
Examples:
Example | Sample Output | Description |
<<AAA\r\nBBB\r\nCCC,FUN_JSONDEC>> | AAA{NEWLINE}BBB{NEWLINE}CCC | \r\n is replaced by {NEWLINE} |
<<This is \"double quoted\" string,FUN_JSONDEC>> | This is "double quoted" string | \" is replaced with Double quote |
<<Col1\tCol2,FUN_JSONDEC>> | Col1{TAB}Col2 | \t is replaced by {TAB} |
XML / HTML Functions
FUN_XMLENC
Syntax:
<<input_string,FUN_XMLENC>>
Encodes plain text to XML encoded value (e.g. > is replaced to > and < is replaced to < )
Parameters:
Name | Description |
input_string | [String] Input string which you like to encode |
Examples:
Example | Sample Output | Description |
<<1<2<3,FUN_XMLENC>> | "1<2<3" | |
FUN_XMLDEC
Syntax:
<<input_string,FUN_XMLDEC>>
Decodes XML value to plain text (e.g. > is replaced to > and < is replaced to < )
Parameters:
Name | Description |
input_string | [String] Input string which you like to decode |
Examples:
Example | Sample Output | Description |
<<"1<2<3",FUN_XMLDEC>> | 1<2<3 | |
FUN_NEW_GUID
Syntax:
<<[format],FUN_NEW_GUID>>
Creates a new unique GUID
Parameters:
Name | Description |
format (Optional) | [String] Output format of new GUID. Possible formats are d,n,p,b |
Examples:
Example | Sample Output | Description |
<<FUN_NEW_GUID>> | 12f4a35e-6d52-45f1-9788-8e3801d85704 | |
<<d,FUN_NEW_GUID>> | b86abe10-a6ea-49c3-a5e8-383c8d565ec2 | |
<<n,FUN_NEW_GUID>> | ec7bcd8842324379adfe2e7e31b8da24 | |
<<p,FUN_NEW_GUID>> | (6711cee1-aaf7-41bb-a4b6-502409ae6ae6) | |
<<b,FUN_NEW_GUID>> | {6c8d8306-9449-440e-89be-8ee7549cc271} | |
Encoding Functions
FUN_URLENC
Syntax:
<<input_string,FUN_URLENC>>
Encodes input string to percentage encoding format for URL (e.g. A&B is encoded to A%26B)
Parameters:
Name | Description |
input_string | [String] Input string which you like to encode. |
Examples:
Example | Sample Output | Description |
<<A&B,FUN_URLENC>> | A%26B | & is encoded as %26 |
<<*_*,FUN_URLENC>> | %2A_%2A | * is encoded as %2A |
<<A B,FUN_URLENC>> | A+B | By default space is encoded as + rather than %20. If you want to encode space using percent encoding like other special characters then use FUN_URLENCDATA function so you get %20 rather than +. This is only needed in special case (i.e. Passing data via Body rather than URL) |
FUN_URLDEC
Syntax:
<<input_string,FUN_URLDEC>>
Decodes url encoded value to plain text
Parameters:
Name | Description |
input_string | [String] URL encoded string which you like to decode. |
Examples:
Example | Sample Output | Description |
<<A%26B,FUN_URLDEC>> | A&B | %26 is decoded as & |
<<%2A_%2A,FUN_URLDEC>> | *_* | %2A is decoded as * |
<<A+B%20C,FUN_URLDEC>> | A B C | + or %20 is decoded as space |
FUN_URLENCDATA
Syntax:
<<input_string,FUN_URLENCDATA>>
Encodes input string to percentage encoding format for URL using exact same rules as FUN_URLENCDATA except space is encoded as %20 rather than +
Parameters:
Name | Description |
input_string | [String] Input string which you like to encode. |
Examples:
Example | Sample Output | Description |
<<A&B,FUN_URLENCDATA>> | A%26B | & is encoded as %26 |
<<*_*,FUN_URLENCDATA>> | %2A_%2A | * is encoded as %2A |
<<A B,FUN_URLENCDATA>> | A%20B | space is encoded as %20 (use FUN_URLENC function if you like to encode space as + rather than %20) |
FUN_BASE64ENC
Syntax:
<<input_text,FUN_BASE64ENC>>
Encodes input string to BASE64 format
Parameters:
Name | Description |
input_text | [String] Input string which you like to encode as Base64 text. |
Examples:
Example | Sample Output | Description |
<<ABCDEF123##,FUN_BASE64ENC>> | QUJDREVGMTIzIyM= | |
<<myuser1:MyP@ssWord,FUN_BASE64ENC>> | bXl1c2VyMTpNeVBAc3NXb3Jk | |
FUN_BASE64DEC
Syntax:
<<input_text,FUN_BASE64DEC>>
Decodes base64 encoded string to plain text
Parameters:
Name | Description |
input_text | [String] Input string which you like to decode from Base64 text to plain text. |
Examples:
Example | Sample Output | Description |
<<QUJDREVGMTIzIyM=,FUN_BASE64DEC>> | ABCDEF123## | |
<<bXl1c2VyMTpNeVBAc3NXb3Jk,FUN_BASE64DEC>> | myuser1:MyP@ssWord | |
Number Functions
FUN_SEQUENCE
Syntax:
<<[seed_number],FUN_SEQUENCE>>
Returns a number in a sequence (adds +1 in last number)
Parameters:
Name | Description |
seed_number (Optional) | [String] Start number for sequence |
Examples:
Example | Sample Output | Description |
<<FUN_SEQUENCE>> | 1 | Call same function again returns 2.. 3.. 4.. so on |
<<1000,FUN_SEQUENCE>> | 1000 | Call same function again returns 1001.. 1002.. 1003.. so on |
FUN_RANDOM_INT
Syntax:
<<[max_number],FUN_RANDOM_INT>>
Generates a random integer from 1 to given max range
Parameters:
Name | Description |
max_number (Optional) | [String] Maximum integer for boundary. Default=2147483647 |
Examples:
Example | Sample Output | Description |
<<FUN_RANDOM_INT>> | 112345667 | Generate random number between 1 and 2147483647 |
<<1000,FUN_RANDOM_INT>> | 1234 | Generate random number between 1 and 1000 |
Using direct static placeholders
New Version introduced new feature to apply static placeholders on string.
To apply placeholder function on direct string you must enclose data in double angle brackets (not curly brackets) and function name must start with FUN_ (e.g. <<myuser1:mysecretpass123,FUN_BASE64ENC>>).
Usecase: You want to encode userid and password to base64 format without extra steps to specifying static placeholder like below
Authorization: <<mysecretpass123,FUN_BASE64ENC>>
Above string will produce following result.
Authorization: bXlzZWNyZXRwYXNzMTIz
Copyrights reserved. ZappySys LLC.