<< 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 integer portion of a division.




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.



A company uses Bizagi to manage their logistics processes. One of these processes is called Inventory management. In one of the activities of this process it is necessary to calculate the box storage capacity of a warehouse. To calculate it the dimensions of the warehouse and boxes are entered.


As the result may return a fractional number (which has no sense because you cannot store a fraction of a box) you can use the Quotient function to obtain only the integer part of the quotient.


The storage capacity of the warehouse could be calculated as below:




//Obtain the number of boxes that can be stored breadthways

WidthCapacity = CHelper.Math.Quotient(<InventoryManagement.Warehouse.Width>, <InventoryManagement.Boxes.Width>);

//Obtain the number of boxes that can be stored lengthwise

LengthCapacity = CHelper.Math.Quotient(<InventoryManagement.Warehouse.Length>, <InventoryManagement.Boxes.Length>);

//Obtain the number of boxes that can be stored upward

HeightCapacity = CHelper.Math.Quotient(<InventoryManagement.Warehouse.Height>, <InventoryManagement.Boxes.Height>);

//Calculate the total number of boxes that can be stored in the warehouse

<InventoryManagement.Warehouse.Capacity> = WidthCapacity * LengthCapacity * HeightCapacity;