Excel-like Function
This documentation provides detailed information about various functions available for use, including descriptions, purposes, syntax, usage examples with static values, and usage examples with custom tokens. The functions covered include SUM, SUM_LIST, AVG, AVG_LIST, MIN, MIN_LIST, MAX, MAX_LIST, DAY, MONTH, COUNT, YEAR, MINUTE, HOUR, SECOND, WEEK, NOW, TODAY, DATEDIFF, DATECOMPUTE, POW, SQRT, PMT, PV, EMI, LIMIT, SORT, and FILTER.
How to Use the Functions?
You can utilize these functions within the formula editor and the Custom JS editor. Here’s a step-by-step guide to using them effectively:
1. Formula Editor
The formula editor allows you to input and evaluate expressions using the available functions. Here's how to proceed:
Open the Formula editor: You can open formula editor wherever it is available.
Input Your Formula: Use the functions as part of your expression. For example, to calculate the sum of a list, you can write:
Evaluate: Execute the formula to get the result.
2. Custom JS Editor
The Custom JS editor provides a more flexible environment for writing and executing JavaScript code, including the use of these functions.
Open the Custom JS Editor: Access the editor where you can write custom JavaScript.
Write Your Code: Incorporate the functions within your script. For instance, to compute the average of an array:
Run the Script: Execute your script to see the results.
By using these editors, you can effectively integrate and apply the functions to achieve your desired calculations and logic.
Available Functions List
The available functions are grouped into categories based on their functionality. These include arithmetic functions, date and time functions, and array manipulation functions.
1. SUM
The SUM
function calculates the total sum of a series of numbers provided as arguments.
Syntax: The syntax of the SUM
function is straightforward. Here is how you can write it:
In the SUM function, you can use static values but not any custom tokens. Here are some examples:
2. SUM_LIST
The SUM_LIST
function calculates the sum of the elements in a list. Here is the syntax of the SUM_LIST
function:
You can use this function with static values and with custom token values, like this:
With Static Values:
With Custom Tokens:
3. AVG
The AVG
function calculates the average of a series of numbers provided as arguments.
Syntax: The syntax of the AVG
function is straightforward. Here is how you can write it:
In the AVG function, you can use static values but not any custom tokens. Here are some examples:
4. AVG_LIST
The AVG_LIST
function calculates the average of the elements in a list. Here is the syntax of the AVG_LIST
function:
You can use this function with static values and with custom token values, like this:
With Static Values:
With Custom Tokens:
5. MIN
The MIN
function finds the smallest number in a given set of numbers.
Syntax: The syntax of the MIN
function is straightforward. Here is how you can write it:
In the MIN function, you can use static values but not any custom tokens. Here are some examples:
6. MIN_LIST
The MIN_LIST
function finds the smallest number in a list. Here is the syntax of the MIN_LIST
function:
You can use this function with static values and with custom token values, like this:
With Static Values:
With Custom Tokens:
7. MAX
The MAX
function finds the largest number in a given set of numbers.
Syntax: The syntax of the MAX
function is straightforward. Here is how you can write it:
In the MAX function, you can use static values but not any custom tokens. Here are some examples:
8. MAX_LIST
The MAX_LIST
function finds the largest number in a list. Here is the syntax of the MAX_LIST
function:
You can use this function with static values and with custom token values, like this:
With Static Values:
With Custom Tokens:
9. DAY
The DAY
function returns the day of the month from a given date.
Syntax: The syntax of the DAY
function is straightforward. Here is how you can write it:
In the DAY function, you can use static values but not any custom tokens. Here are some examples:
10. MONTH
The MONTH
function returns the month from a given date.
Syntax: The syntax of the MONTH
function is straightforward. Here is how you can write it:
In the MONTH function, you can use static values but not any custom tokens. Here are some examples:
11. YEAR
The YEAR
function returns the year from a given date.
Syntax: The syntax of the YEAR
function is straightforward. Here is how you can write it:
In the YEAR function, you can use static values but not any custom tokens. Here are some examples:
12. MINUTE
The MINUTE
function returns the minute component of a given datetime.
Syntax: The syntax of the MINUTE
function is straightforward. Here is how you can write it:
In the MINUTE function, you can use static values but not any custom tokens. Here are some examples:
13. HOUR
The HOUR
function returns the hour component of a given datetime.
Syntax: The syntax of the HOUR
function is straightforward. Here is how you can write it:
In the HOUR function, you can use static values but not any custom tokens. Here are some examples:
14. SECOND
The SECOND
function returns the second component of a given datetime.
Syntax: The syntax of the SECOND
function is straightforward. Here is how you can write it:
In the SECOND function, you can use static values but not any custom tokens. Here are some examples:
15. WEEK
The WEEK
function returns the week number of a given date.
Syntax: The syntax of the WEEK
function is straightforward. Here is how you can write it:
In the WEEK function, you can use static values but not any custom tokens. Here are some examples:
16. NOW
The NOW
function returns the current date and time in the current locale.
Syntax: The syntax of the NOW
function is straightforward. Here is how you can write it:
In the NOW function, you can use static values but not any custom tokens. Here are some examples:
17. TODAY
The TODAY
function returns the current date in the current locale.
Syntax: The syntax of the TODAY
function is straightforward. Here is how you can write it:
In the TODAY function, you can use static values but not any custom tokens. Here are some examples:
18. DATEDIFF
The DATEDIFF
function calculates the difference between two specified dates or timestamps.
Syntax: The syntax of the DATEDIFF
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
19. DATECOMPUTE
The DATECOMPUTE
function computes a new date by adding or subtracting a specified amount of time from a given date.
Syntax: The syntax of the DATECOMPUTE
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
20. POW
The POW
function raises a number to the power of another number.
Syntax: The syntax of the POW
function is straightforward. Here is how you can write it:
In the POW function, you can use static values but not any custom tokens. Here are some examples:
21. SQRT
The SQRT
function returns the square root of a number.
Syntax: The syntax of the SQRT
function is straightforward. Here is how you can write it:
In the SQRT function, you can use static values but not any custom tokens. Here are some examples:
22. PMT
The PMT
function calculates the payment for a loan based on constant payments and a constant interest rate.
Syntax: The syntax of the PMT
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
23. PV
The PV
function calculates the present value of an investment based on a series of future payments.
Syntax: The syntax of the PV
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
24. EMI
The EMI
function calculates the Equated Monthly Installment (EMI) for a loan.
Syntax: The syntax of the EMI
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
25. LIMIT
The LIMIT
function limits the number of elements returned in an array to a specified number.
Syntax: The syntax of the LIMIT
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
26. SORT
The SORT
function sorts a list of numbers or objects based on specified criteria.
Syntax: The syntax of the SORT
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
With Numbers:
With Objects:
27. FILTER
The FILTER
function filters elements in an array based on specified criteria.
Syntax: The syntax of the FILTER
function is straightforward. Here is how you can write it:
You can use this function with static values. Here are some examples:
28. COUNT
The COUNT
function returns the total number of items in an array or list, providing a quick way to determine the size of the collection.
Syntax: The syntax of the COUNT
function is straightforward. Here is how you can write it:
Using:
With Static Values:
With Custom Tokens:
Output: A numerical value representing the total number of elements in the array or list.
Conclusion
These notes give a tutorial-like explanation of all the facilities provided by our system with essential reference to arithmetic functions and their constants, date and time functions, and array-manipulating functions. For each defined function, the function description is given along with its purpose, syntax, examples of usage, and anticipated result.
The arithmetic functions such as SUM, SUM_LIST, AVG, AVG_LIST, MIN, MIN_LIST, MAX, and MAX_LIST enable users to do basic mathematical calculations of numbers or lists of numbers. These functions can accept not only static values but also the computed values by the application and other tokens making the functions useful in various points of applications.
The types of functions include the date and time functions which include; DAY, MONTH, YEAR, MINUTE, HOUR, second, week, now, today, DATEDIFF, and DATECOMPUTE. These functions provide for such basic functions as extraction of components of dates, calculations of differences between dates, and computations of new dates taking into consideration certain parameters.
The array manipulation functions including LIMIT
, SORT
, and FILTER
enable proficient handling and processing of the arrays. These functions allow a programmer to sort, filter, and maybe limit the number of elements to be contained in an array; and as such, data manipulation of these arrays is simple and fast.
If one comprehends and applies these functions, then the users can improve their data processing to achieve efficiency and constructiveness in performances giving a view to the exactness of significance. This documentation is thus useful in the best exploitation of features in the various functions of our system.
Last updated