07.4 Functions
Algorithm
Operators in this group ensure the execution of logical operations with operands and output the result. The outcome of these operations varies.
Result
If
t outputs a specified value when conditions are met or a different value if the conditions are not met.
![](/img/notion/64366a56-0adb-47ee-a7c7-09f7f003e6b9/Untitled.png)
- Result of the expression: Specified value.
- Example: If 3.ValueSV = 10, then true. If 3.ValueSV = 11, then false.
()
This operator provides logical and mathematical isolation for any expressions.
- Result of the expression: -.
not
This operator provides logical negation of specified/received boolean values.
![](/img/notion/383568d7-2a01-4f05-a177-516d06cce654/Untitled.png)
- Result of the expression: Negation of the value.
- Example: If 3.ValueSV is TRUE, then FALSE
if empty
It outputs a specified value if the operand is absent (null), and the value of the operand if it is present.
![](/img/notion/2253d7c1-27aa-44ac-938f-931aa108adff/Untitled.png)
- Result of the expression: The value.
- Example: If 3.ValueSV is absent (null), then 5. If 3.ValueSV = 50, then 50.
empty
This operator checks for the absence of values in the operand.
![](/img/notion/370f0496-3657-49ac-977f-8bc4e059c28c/Untitled.png)
- Result of the expression: TRUE/FALSE.
- Example: If 3.ValueSV is absent (null), then TRUE. If 3.ValueSV = "May", then FALSE.
contains
This operator checks for the presence of selected characters in a string, number, or array (including an array of boolean values), regardless of their location.
![](/img/notion/1b808da5-8f39-46f8-97f4-43567b5cd1ce/Untitled.png)
- Result of the expression: TRUE/FALSE.
- Example: If 3.ValueSV = "Hello Latenode", then TRUE. If 3.ValueSV = "Hi Latenode", then FALSE.
starts with
This operator checks for the presence of selected characters at the beginning of a string or number.
![](/img/notion/b26280af-4617-44ab-b4c5-8d7ae04f5617/Untitled.png)
- Result of the expression: TRUE/FALSE.
- Example: If 3.ValueSV = "June", then TRUE. If 3.ValueSV = "May", then FALSE. If 3.ValueSV = "1000", then FALSE.
ends with
This operator checks for the presence of selected characters at the end of a string or number.
![](/img/notion/d58ee66e-364a-4c78-a780-b9bc4835f995/Untitled.png)
- Result of the expression: TRUE/FALSE.
- Example: If 3.ValueSV = "June", then TRUE. If 3.ValueSV = "May", then FALSE. If 3.ValueSV = "1000", then FALSE.
matches pattern
This operator checks for a match between the operand and a regular expression.
![](/img/notion/d117b5a7-0996-4631-9c76-107061b50c8e/Untitled.png)
- Result of the expression: TRUE/FALSE.
- Example: If 3.ValueSV = "Abc", then TRUE. If 3.ValueSV = 2000, then FALSE.
to lower
This operator converts a string to lowercase.
![](/img/notion/8927a58f-a365-466f-9520-e1f3c1e7bd78/Untitled.png)
- Result of the expression: Lowercase text.
- Example: If 3.ValueSV = 'TEST', then test.
to upper
This operator converts a string to uppercase.
![](/img/notion/93c3d15f-9365-4ab0-8895-7dac9b815b80/Untitled.png)
- Result of the expression: Uppercase text.
- Example: If 3.ValueSV = 'test', then TEST.
length
This operator outputs the number of characters in a string or the number of values in an array.
![](/img/notion/aaed90fe-c512-4d68-9443-aa766d5e9600/Untitled.png)
- Result of the expression: A number.
- Example: If 3.ValueSV = 'test', then 4.
get
This operator outputs a JSON parameter or an array element.
- Result of the expression: Parameter.
- Example: The value of the parameter ValueWH1 from the provided JSON. For example, if ValueWH1 = 15, then 15.
![](/img/notion/d94e676a-00c8-413f-87de-a2e55cf33125/Untitled.png)
- Example: The value of the element in the provided array ValueWH with index 1. For instance, if ValueWH1 = 15, then 15.
![](/img/notion/855a60c5-1d44-4008-bbb2-bf42bd02998e/Untitled.png)
switch
This operator checks if the expression matches the selected operand and outputs a value when a match is found. The operand can be a boolean value, a string, or a number.
The function operator the result corresponding to the first matching value.
![](/img/notion/e027b9a2-1c79-494c-bf60-6a83e2472a33/Untitled.png)
- Result of the expression: Value.
- Example: If 3.ValueSV = 'A', then 1. If 3.ValueSV = 'Abc1000', then 2.
replace
This operator replaces selected values in a string or number with specified values.
![](/img/notion/cffc9c63-9619-4d7d-a27d-9313c6690745/Untitled.png)
- Result of the expression: Text or number with character replacement.
- Example: If 3.ValueSV = 'Hi Latenode', then 'Test Latenode'.
trim
This operator removes spaces at the beginning and end of a string.
![](/img/notion/61fc6e04-5e7d-4969-b80f-9984af339c0a/Untitled.png)
- Result of the expression: Text without spaces.
- Example: If 3.ValueSV = ' Hi Latenode ', then 'Hi Latenode'.
substring
This operator outputs a portion of a string or number from a selected starting position not inclusive to a chosen ending position, inclusive.
![](/img/notion/dfb769c3-b754-4960-b861-6788c1d68a27/Untitled.png)
- Result of the expression: A portion of text.
- Example: If 3.ValueSV = 'Latenode', then 'a'.
indexOf
This operator provides the position of the first occurrence of a search value in a string or number.
This operator returns "-1" if the search value is not found.
![](/img/notion/db202a47-4ea9-44ff-bb68-45f6d799795e/Untitled.png)
- Result of the expression: A portion of text.
- Example: If 3.ValueSV = 'Latenode', then 4.