Check if value entered in page item or IG-column is a number with a Client-Side Javascript Expressio
The idea is to be able to check to see if the value entered into a field is a number or not. It's a javascript function that can be used inside a client-side javascript expression for a dynamic action for a page item or IG column.
In this example I will use the javascript function to check to see if the value keyed down inside an interactive grid cell is a number.
Place this in the Page => Function and Global Variable Declaration =>
function isNumber(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
Then create a dynamic action on the IG column (in my case a 'Number Field' IG column type):