FMT($999,999,999.99) alignment
Moderators: Susan Smith, admin, Gabriel
FMT($999,999,999.99) alignment
I am using an FMT($999,999,999.99) spec on a numeric field. I want the user to start type on the right side of the field, so if they enter 100, the field will show 1.00
How do I do this? Is there a way to make this field right-aligned? Or maybe use another spec?
How do I do this? Is there a way to make this field right-aligned? Or maybe use another spec?
-
- Posts: 4
- Joined: Tue Jun 09, 2009 11:24 am
[BR_forum] FMT($999,999,999.99) alignment
Hi Mikhail
The only spec I know of that is formatted and auto right justifies is using the PIC($ZZ,ZZZ,ZZZ.##) and must be used with a numeric variable. This handles the 100, to show 1.00.
Eddie Singer
Crosstech Systems, Inc.
From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Mikhail
Sent: Friday, March 30, 2012 10:25 AM
To: br_forum@ads.net
Subject: [BR_forum] FMT($999,999,999.99) alignment
I am using an FMT($999,999,999.99) spec on a numeric field. I want the user to start type on the right side of the field, so if they enter 100, the field will show 1.00
How do I do this? Is there a way to make this field right-aligned? Or maybe use another spec?
The only spec I know of that is formatted and auto right justifies is using the PIC($ZZ,ZZZ,ZZZ.##) and must be used with a numeric variable. This handles the 100, to show 1.00.
Eddie Singer
Crosstech Systems, Inc.
From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of Mikhail
Sent: Friday, March 30, 2012 10:25 AM
To: br_forum@ads.net
Subject: [BR_forum] FMT($999,999,999.99) alignment
I am using an FMT($999,999,999.99) spec on a numeric field. I want the user to start type on the right side of the field, so if they enter 100, the field will show 1.00
How do I do this? Is there a way to make this field right-aligned? Or maybe use another spec?
I never found a solution that I like, so I ended up using CR 12,AE for my input statement.
As the user types, the cursor starts at the right, but no automatic formatting happens as they type.
The AE attribute causes a "Round Trip", and I process the string, and format it for the user, so as soon as they leave the field it is formatted the correct way.
As the user types, the cursor starts at the right, but no automatic formatting happens as they type.
The AE attribute causes a "Round Trip", and I process the string, and format it for the user, so as soon as they leave the field it is formatted the correct way.
[BR_forum] FMT($999,999,999.99) alignment
Gordon, I need the field to already contain the $ sign, commas and the decimal point, so N 12.2 wouldn’t work for that
From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of gordon
Sent: Friday, March 30, 2012 9:50 PM
To: br_forum@ads.net
Subject: Re: [BR_forum] FMT($999,999,999.99) alignment
You can use N 12.2 with DECIMAL ASSUMED.
See http://brwiki.ads.net/index.php?title=BRConfig.Sys#DECIMAL
From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of gordon
Sent: Friday, March 30, 2012 9:50 PM
To: br_forum@ads.net
Subject: Re: [BR_forum] FMT($999,999,999.99) alignment
You can use N 12.2 with DECIMAL ASSUMED.
See http://brwiki.ads.net/index.php?title=BRConfig.Sys#DECIMAL
-
- Posts: 4
- Joined: Tue Jun 09, 2009 11:24 am
[BR_forum] FMT($999,999,999.99) alignment
Hi All
I agree with all the options you gave. The only issue I see is that he wanted the $ symbol leading.
Eddie Singer
From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of GomezL
Sent: Friday, March 30, 2012 3:06 PM
To: br_forum@ads.net
Subject: Re: [BR_forum] FMT($999,999,999.99) alignment
I never found a solution that I like, so I ended up using CR 12,AE for my input statement.
As the user types, the cursor starts at the right, but no automatic formatting happens as they type.
The AE attribute causes a "Round Trip", and I process the string, and format it for the user, so as soon as they leave the field it is formatted the correct way.
I agree with all the options you gave. The only issue I see is that he wanted the $ symbol leading.
Eddie Singer
From: br_forum-bounces@ads.net [mailto:br_forum-bounces@ads.net] On Behalf Of GomezL
Sent: Friday, March 30, 2012 3:06 PM
To: br_forum@ads.net
Subject: Re: [BR_forum] FMT($999,999,999.99) alignment
I never found a solution that I like, so I ended up using CR 12,AE for my input statement.
As the user types, the cursor starts at the right, but no automatic formatting happens as they type.
The AE attribute causes a "Round Trip", and I process the string, and format it for the user, so as soon as they leave the field it is formatted the correct way.
[BR_forum] FMT($999,999,999.99) alignment
Small example?
let me see if I can cobble something.
The basic idea convert number to formatted string
Input char value
Strip symbols and convert to number
We assume that if you don't type a ". " that you entered cents
Loop back to format and input .
Sent from my iPhone
On Mar 31, 2012, at 9:41 AM, "Mikhail" <brforumlist@ads.net (brforumlist@ads.net)> wrote:
let me see if I can cobble something.
The basic idea convert number to formatted string
Input char value
Strip symbols and convert to number
We assume that if you don't type a ". " that you entered cents
Loop back to format and input .
Sent from my iPhone
On Mar 31, 2012, at 9:41 AM, "Mikhail" <brforumlist@ads.net (brforumlist@ads.net)> wrote:
PIC is not right aligned. I will have to use logic similar to what Luis described. Luis can you provide a small example of using CR 12, AE like you described
_______________________________________________
BR_forum mailing list
BR_forum@ads.net (BR_forum@ads.net)
http://box475.bluehost.com/mailman/listinfo/br_forum_ads.net
[BR_forum] FMT($999,999,999.99) alignment
We need all the variables to be strings.
Using numeric variables is not an option. It is a centralized function that processes all screens with the same rinput statement. It would not be possible to guess every combination of string-number-string/string-string-number-number-string/etc that every screen in the software uses. We're enhancing Screen Ace to use BR! instead of VB6. An array of strings are passed in and are passed back - then numbers are take out with the val command by the calling program.
-john
-john