This topic describes the syntax and usage of the power function in Zoho Creator .


The power function returns the result of a number raised to a power.




power(<num1>,<num2>); // This format is supported only in free-flow scripting mode of script builder.

The power function syntax has the following arguments:

num1 - Required. The base number. It can be a integer/decimal value or expression.

num1 - Requied. The exponent to which the base number is raised. It can be an integer value or expression.

Return Value

Returns an integer / decimal value representing the power of the number.

Example 1

To find 5 power 2:

num1.power(2) // returns 25


power(num1,2) //returns 25

Example 2

You can use the “power()” function to calculate an exponent in a formula field. For example, to calculate simple interest with the following formula :

(Principle * (1 + 0.08 / 365) + fee) ^ (Todaysdate - Issue_Date)

Add a formula field with the following expression:

(Principle * (1 + 0.08 / 365) + fee).power(Todaysdate - Issue_Date))

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocreator.com