Problem in editing a decimal field.

Shubham Pipada

New Member
Hello everyone,
I have a doubt which may sound to be strange but since I am unable to resolve it after attempts, I am posting this.
I have a decimal field in my schema defined with FORMAT ">>9.99" that means that the field can take values upto 999.99(i.e upto 3 places before decimal).
So when I try to assign some value to a variable thats declared like this field, it does takes correct value i.e upto 3 digits before decimal and 2 digits after decimal. But ,
incase if i want to edit the value/change the value, for e.g: if i firstly assign the variable the value as 113.45 and i want to change the value to 124.45, then it does not takes up the change. I mean it would take it as 1.24 and it wont take 124.45. Sometimes on trying to erase and again assigning, it takes.But sometimes it doesnt. I am unable to figure out as to why this editing a decimal field is giving the problem. So can someone please help me with this?
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I have a decimal field in my schema defined with FORMAT ">>9.99" that means that the field can take values upto 999.99(i.e upto 3 places before decimal).
The FORMAT in the schema is the default display format. It does not determine which values can be stored in the field. A decimal field can hold any value that is valid for the decimal data type. And the schema format only determines how the values are displayed if the developer chooses not to override the default display format in their UI code.

You can be limited in the values you are able to enter into a UI element (e.g. a fill-in), whose value is assigned, directly or indirectly, to that decimal field but that depends on how the code is written.

I can't explain why you are experiencing the issues you describe. It would be helpful to see the actual code.
 

tamhas

ProgressTalk.com Sponsor
Note also that the DECIMALS property of the field will determine how many decimals to the right can be assigned, regardless of the display format.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Note also that the DECIMALS property of the field will determine how many decimals to the right can be assigned, regardless of the display format.
Yes, good point.
 

Cringer

ProgressTalk.com Moderator
Staff member
Which Progress version? There are a few bugs I logged in older versions with DECIMAL editing which make things quite interesting... :)
All the same, a working code example will go a long way to getting help.
 

Shubham Pipada

New Member
Which Progress version? There are a few bugs I logged in older versions with DECIMAL editing which make things quite interesting... :)
All the same, a working code example will go a long way to getting help.
Its 11.6.4
 

TomBascom

Curmudgeon
And a code sample?
 
Top