Is Not a Number

<< 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 >

Is Not a Number


This function checks if a parameter is not a number:

Returns true if the parameter is not a number.

Returns false if the parameter is a number.




The parameter of this function can be defined as an XPath, variable or number.



The supported attribute types to use as input XPath parameter (or Xpaths stored in variables) are: integer, currency, float, real.



Suppose you want to evaluate if the parameters to be used in a Math function are numbers in order to avoid errors or incoherent results. To do so you can use the IsNaN function:





//Evaluate if of the parameters to be used in the average function are numbers




if (Number1IsNotaNumber==true || Number1IsNotaNumber==true)


//If not show an error message

CHelper.ThrowValidationError("The parameters of the Average function must be numbers");


//If so, apply the math function