[SOLVED]Please need help to understand how decimal field works in form application

Hello,
I am using SC V8 latest update (8.00.0036)

In a form application I have set a decimal field as 4 digits with 2 digits as decimal part (XX.YY)

If I type 4490 (without typing any comma or point) SC displays 44.90

If I type 490 (again without typing any comma or point) SC displays 4.90

It seems to me that SC automatically add the decimal separator in order to have always 2 digits after it, WITHOUT requiring the user to type any decimal separator.
Is it the correct behaviour ?

If this is the correct behaviour, can you please explain me how can I force SC to display 44.9 ?

Please note that 44.9 and 44.90 are not the same number for me: I am writing a scientific application and 44.9 means that I have measured up to the first digit and I am not sure about the second digit , where 44.90 means that my measure is precise up to the second digit.

Thanks for your help.

It’s default behaviour caused by javascript. The numbers roll in from right to left so yes, the decimal point is working that way. (I don’t like that, but it’s the way it is).

This is a problem with SC. Look this thread: http://www.scriptcase.net/forum/showthread.php?8548-ScriptCase-v8-0-035-(03-19-2015-20-20)

Thanks. Now it makes sense.

Hello,

This problem has been fixed and will be available in the next update.

HI, Good News, The SC Team sending me the file containing the fix, and is up to you use it and/or pass on to other users.

In its ScriptCase folder in the directory scriptcase/devel/lib/js, change the jquery.scInput.js file so I am sending you out in the attachment of this email.

In Environmant Development copy in the _lib/lib/js

jquery.scInput.zip (8.07 KB)

Works Great!!

Great news, we need to generate the apps again with this new file or only update the file in the environ dir?

Only Copy it.

Clear cache of your browser.

Without clear the cache didn’t work and its logic, I clear and Its works Great… one problem that i Have… I got 350 users in differents places and they don’t have the Knowledge to clear the cache :frowning: jajaj its the cruel reality… I don’t know in all the years I didn’t need to clear the cache in the releases, and the system had start from the V5, its there any other way to apply this… to the users…

Thanks!

[QUOTE=adrian.arreola;34814]Without clear the cache didn’t work and its logic, I clear and Its works Great… one problem that i Have… I got 350 users in differents places and they don’t have the Knowledge to clear the cache :frowning: jajaj its the cruel reality… I don’t know in all the years I didn’t need to clear the cache in the releases, and the system had start from the V5, its there any other way to apply this… to the users…

Thanks![/QUOTE]

Because you don’t always need it. Sometimes Browsers has it’s own soul and decide to retrieve again the files.

A “way” to “force” with JS is
window.location.reload(true)

But this not clear cache, just tell browser to reload all files, and browser will do whatever it wants :stuck_out_tongue: