Process decimal values with different regional settings
When importing/processing decimal values, the decimal separator is . or , according to the regional setting. Assuming you want to import decimal values with US Standard regional setting, then the separator is a point (.).
To process such decimal values, you can work with the NAV Command GLOBALLANGUAGE. That is the in NAV at runtime used language.
impValue := 0.25; impValStr := format(impValue); // check for GER and FR language if (GLOBALLANGUAGE = 1031) OR (GLOBALLANGUAGE = 1036) then impValStr := Convertstr(impValStr,'.'','); // replaces the point by a comma
Additional you can use the Command WINDOWSLANGUAGE. This command returns the regional system setting (the language of the OS). In common with that command you can handle every case.
for language codes follow
http://technet.microsoft.com/en-us/library/dd346950.aspx
links:
http://msdn.microsoft.com/en-us/library/dd338772.aspx
http://msdn.microsoft.com/en-us/library/dd301095.aspx
Filed under: c/al, nav 2009, nav 2013, nav functions Tagged: c/al, nav 2009, nav 2013, nav 5

Like
Report
*This post is locked for comments