Page 1 of 1
Add Page Default Value 0
Posted: Thu Aug 15, 2013 12:52 am
by mpol_ch
Hello
I am trying to set the default value for Add Page as "0". It deos not accept. When I set it to 1 or 90 it is not a problem. But 0 is not accepted. I have to set it to 0 because a auto calculation of an customer script.
Thanks
mpol_ch
Re: Add Page Default Value 0
Posted: Thu Aug 15, 2013 10:51 am
by danielc
What do you mean by "does not accept"? Is it "0" not display as default value at Add Page? Have you tried for another field to have default "0" at Add Page?
From your description, your field is integer field. It should accept any value include 0.
If you have server event, double check your code.
Re: Add Page Default Value 0
Posted: Thu Aug 15, 2013 11:03 am
by mobhar
What is the type of the field and what database engine are you using?
Re: Add Page Default Value 0
Posted: Fri Aug 16, 2013 3:24 pm
by mpol_ch
Hello
Now I can use the "0" default. But When I save the value they are multipled with x100. Also when I same 8200 then I see in db and in edit mode the value 820000.
Hier my field:
Onetimecosts: Datatype Decimal 12 (MySQL Decimal (10,2))
Format: Number
No. of Digits.. 2
I am using the following script in startup.
Thanks for any hints.
mpol_ch
function showTotal() {
// var Summe = parseFloat(document.getElementById("x_Onetimecosts").value);
var Summe= 0;
var splitted
var elements = document.getElementsByName("x_Options[]");
for (i=0;i < elements.length;i++) {
if (elements[i].checked) {
splitted = elements[i].nextSibling.nodeValue.split(",");
Summe = Summe+ + parseFloat(splitted[1]);
}
}
document.forderformadd.x_Sumoptions.value = Summe.toFixed(2);
document.forderformadd.x_Sumprod.value = (parseFloat(document.getElementById("x_Onetimecosts").value) + Summe).toFixed(2);
Re: Add Page Default Value 0
Posted: Fri Aug 16, 2013 5:40 pm
by digitalphotoworld
If the value is mulitplied with 100, there could be a problem with . and ,
Check the local settings. I had the same problem some days ago and could solve it this way.
Re: Add Page Default Value 0
Posted: Fri Aug 16, 2013 7:30 pm
by mpol_ch
Hello digitalphotoworld
thanks. Yes, it seems to be a language file problem. I am using the german language file.
I think I localised the problem and will do some tests.
thanks
mpol_ch