Why the functions are useful ?
The functions in the studio will allow you to perform calculations quickly, directly within your Ermeo application.
What is the list of usable functions ?
Function | Description | Specificity | Widget type |
abs(x) | Calculates the absolute value of the number x passed as an argument | Number | |
cube(x) | Calculates the cubed multiplication of the number x passed as an argument |
Number | |
gcd(x,y) |
gcd(x,y): Calculates the greatest common divisor between the numbers x and y passed as arguments |
Number | |
mod(x,y) |
mod(x,y): Calculates the remainder of the modulo division of |
Number | |
pow(x,y) | pow(x,y): Calculates the power of the number x by y (x^y) | Number | |
sign(x) | sign(x): Returns -1 if the number x passed as argument is negative, or 1 if the number x passed as argument is positive (or zero) |
Number | |
square(x) | square(x): Returns the result of multiplying the value x passed as an argument by itself (x*x) |
Number | |
round(x) |
Calculates the rounded value of the number x passed as an argument. It is not possible to choose between rounding up or rounding down. |
Specific with decimal | Number |
compare(x,y) |
Returns 1 if the number x passed as argument is greater than the number y passed as argument. Returns -1 if y is greater than x. Returns 0 if x is equal to y. |
Number | |
equal(x,y) |
Returns 1 if the numbers x and y passed as arguments are equal. Returns 0 if x and y are different. |
Number | |
unequal(x,y) |
Returns 1 if the numbers x and y passed as arguments are different. Returns 0 if x and y are equal. |
Number | |
larger(x,y) |
Returns 0 if the number y passed as argument is greater than or equal to the number x passed as argument. Returns -1 if y is less than x. |
Number | |
smaller(x,y) | Returns 1 if x is less than or equal to y. Returns 0 if x is greater than y | Number | |
max(a,b,c) | Returns the largest value among the values a,b and c | Number | |
min(a,b,c) | Returns the smallest value among the values a,b and c | Number | |
mean(a,b,c) | Returns the average of the values a,b and c passed as an argument. | Number | |
variance(a,b,c) | Returns the variance of the values a,b and c passed as an argument | Number | |
hasNumericValue(x) | Returns 1 if the x value passed as argument is a number. | Number | |
isInteger(x) | Returns 1 if the value x passed as an argument is an integer | Number | |
isNegative(x) |
Returns 1 if the value x passed as argument is a negative number. Returns 0 if the number is strictly greater than 0 |
Number | |
isPositive(x) |
Returns 1 if the value x passed as argument is a positive number. Returns 0 if the number is strictly less than 0. |
Number | |
isZero(x) |
Returns 1 if the value x passed as argument is equal to 0. Returns 1 if the number is different from 0 |
Number | |
Count | https://support.ermeo.com/hc/en-us/articles/4407710265490-Identify-the-number-of-iterations | Number | |
Random | https://support.ermeo.com/hc/en-us/articles/360011823919-Creating-a-formula-in-Number-widget- | Number | |
Iteration |
##name_of_the_task[1]## : corresponds to the iteration number |
Number, text ... | |
##report_id## |
Having a unique report alphanumeric number creates the uniqueness |
It can only be used in the custom templates and not the design studio |
Custom template |
To use these functions, you must place the name of the function within the calc formula.
Practical example: We are going to use the mean function to calculate the average of two numbers.
1. Drag and drop two Number tiles into your form. Name them "Number 1" and Number 2".
2. Drag and drop a third Number brick. Name it "Average Result".
3. Write the following formula in the formula field: calc(mean(Number1,Number2))
4. Launch the form in preview to observe the average of the numbers.
Comments
0 comments
Please sign in to leave a comment.