Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Copper Elite Contributor
Posts: 39
Registered: ‎07-13-2010

Negative Numbers in Numeric Field

Hello everybody,

 

is it possible to insert a negative number in a SLX (web client) numeric field?

 

I would like to store negative numbers, using the automatic formatting of the numeric field.

Highlighted
Nickel Contributor
Posts: 93
Registered: ‎01-02-2010

Re: Negative Numbers in Numeric Field

No problem. Did you try?

Highlighted
Copper Elite Contributor
Posts: 39
Registered: ‎07-13-2010

Re: Negative Numbers in Numeric Field

We tested it again in AA with decimal, numeric and scientific format. No success.No negative values can be stored.

Highlighted
Nickel Contributor
Posts: 93
Registered: ‎01-02-2010

Re: Negative Numbers in Numeric Field

On the Employee Details tab there is a field called Yearly revenue. try entering eg -22 on that and save. Works fine for me.

Highlighted
Copper Elite Contributor
Posts: 39
Registered: ‎07-13-2010

Re: Negative Numbers in Numeric Field

We think that all standard fields negative numbers can be stored in are text fields.

We now created a workaround using a textfield and restricting the entry of characters by client-side code.

Highlighted
Nickel Contributor
Posts: 93
Registered: ‎01-02-2010

Re: Negative Numbers in Numeric Field

At the risk of sounding repetitive, did you try what I suggested? If so, what happened?

 

It works, without a doubt.

 

Account.Revenue is a decimal(17,4) field. I entered -444 in the field. It saved to the database as -444.0000.

Highlighted
Copper Super Contributor
Posts: 99
Registered: ‎07-04-2009

Re: Negative Numbers in Numeric Field

From a post elsewhere.

 

NB I have not tried this myself.

 

Chris

 

 

Just answered my own question.  In 7.5.3, you need to modify sage-controls.js - line 17.  Add an ASCII 45 ("-") to the conditions in that if statment and you'll be able to read and write negative numbers.

 

var code=e.charCode||e.keyCode;return((code>=48&&code<=57)||code==groupSeparator||code==decimalSeparator||code==45);}

Mike LaSpina
Professional Services Consultant


Cheers
Chris Grant
Plus Consulting