If custom field is a currency and the format will change based on different locales, use ssParseNumFromCurrency(value,locale,getnumtype,emptyok):
- "@sslocale@" returns the logged in user's locale, e.g. "fr-CA"
- getnumtype: 1=real number (10000,78 becomes 10000.78), 2=formatted currency (10000,78)
- emptyok: field can be empty
Example: ssParseNumFromCurrency("10000,78","fr-CA",1,true) will return 10000.78
<pre>if(ssParseNumFromCurrency(form.getStr("cf_myCADcurrency"),"@sslocale@",1,true) > 5)
{result.isPassed=false;
result.addMsg('Some message here');
}
</pre>
For other currencies with format regardless of user's locale, such as DKK, it can be implemented as:<br /> ssParseNumFromCurrency(value,getLocalestrByCurrency('DKK'),1,true) OR ssParseNumFromCurrency(value,"da-DK",1,true)<br />''(getLocalestrByCurrency will get the "default" locale of the currency code)''
<pre>if(ssParseNumFromCurrency(form.getStr("cf_myDKKcurrency"),"da-DK",1,true) > 5)
{result.isPassed=false;
result.addMsg('Some message here');