<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business Rules examples > Math operations, strings and data validations > Perform Math operations >




This function returns the remainder after a number is divided by a divisor.




The parameters of this function can be defined as Xpaths, variables or numbers.



Input parameters must be integers.

The supported attribute type to use as input XPath parameter (or Xpaths stored in variables) is integer.

The function returns an error if the Divisor is equal to 0.

Use the IsNaN function to validate the parameters used are numbers.



Suppose in a Process it has to be evaluated if a number is pair. To do so you can use the Module function using the number 2 as the divisor. If the result obtained is equal to 0 then the number is pair.




//Obtain the Module of the number using 2 as divisor

Module= CHelper.Math.Module(<Process.NumbertoEvaluate>,2)

//Evaluate if the result is equal to 0

if (Module==0)


//If so the number is pair

<Process.IsPair>= true;



//If not the number is not pair

<Process.IsPair>= false;