I have selected Special under field formatting and Phone Number under type.
This is working fine except that I would like the field to show blanks when the 10 digit phone number is 0. Currently, a zero phone number shows one 0 on the input field.
In the green screen world, we developed our own EDTCDE(8) which allowed us to show blanks for a a zero phone number:
Here is what the custom edit code looks like:
Display Edit Description
Edit description . . . . . . . : 8
Integer mask . . . . . . . . . : 0) -
Decimal point character . . . : .
Fraction mask . . . . . . . . :
Fill character . . . . . . . . :
Currency symbol . . . . . . . :
Edit zero values . . . . . . . : *NO
Negative status characters . . :
Positive status characters . . :
Left constant characters . . . : (
Right constant characters . . :
Text . . . . . . . . . . . . . : Telephone Mask
Special format of phone number
-
- Profound User
- Posts: 52
- Joined: Mon Sep 19, 2011 3:00 pm
- First Name: Bruce
- Last Name: Anthony
- Company Name: The State Bar of California
- Contact:
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
Re: Special format of phone number
You should be able to get the formatting you're looking for by using Number formatting. Uncheck "show zero balance" (this will get rid of the single '0' rendering for zero field value), then specify this edit word on the same dialog:
'( ) - '
That the built-in phone number formatting renders a single zero in this case might be an oversight -- we can look into this. In the meanwhile, the above might get you going.
'( ) - '
That the built-in phone number formatting renders a single zero in this case might be an oversight -- we can look into this. In the meanwhile, the above might get you going.
-
- Profound User
- Posts: 52
- Joined: Mon Sep 19, 2011 3:00 pm
- First Name: Bruce
- Last Name: Anthony
- Company Name: The State Bar of California
- Contact:
Re: Special format of phone number
The above does not work where you only have one space between ( and ) and -
It should be '( ) - '
Phone number 1235551212 would be rendered with 123)555-1212 using my edit word
' . . ' doesn't work very well either as the user if forced into inputing the entire phone number when say only one digit needs to be changed.
The special using phone number works great but shows the zero when the phone number is zero.
It should be '( ) - '
Phone number 1235551212 would be rendered with 123)555-1212 using my edit word
' . . ' doesn't work very well either as the user if forced into inputing the entire phone number when say only one digit needs to be changed.
The special using phone number works great but shows the zero when the phone number is zero.
-
- New User
- Posts: 7
- Joined: Mon Jun 05, 2017 1:03 pm
- First Name: sheri
- Last Name: mcpherson
- Company Name: winsupply
- Contact:
Re: Special format of phone number
Apparently this was never fixed because I cannot use this special type and I really want to it would save me tons of work.
The Field is defined with a decimal 13,0 and my edit word is '( ) - ' and my edit mask is '&###&###&####'
I don't have any checkmarks except No extra spaces.
What I want to know is why when my cursor goes to this field on loading the screen or going to the next record I have to type a numeric value twice for it to actually work?
If I put a 9 in the field, it then sets the cursor after the ( left parentheses and then I hit 9 again it positions it correctly.
I put the OnFocus event to this.value(); and it isn't a solution.
Any help?
The Field is defined with a decimal 13,0 and my edit word is '( ) - ' and my edit mask is '&###&###&####'
I don't have any checkmarks except No extra spaces.
What I want to know is why when my cursor goes to this field on loading the screen or going to the next record I have to type a numeric value twice for it to actually work?
If I put a 9 in the field, it then sets the cursor after the ( left parentheses and then I hit 9 again it positions it correctly.
I put the OnFocus event to this.value(); and it isn't a solution.
Any help?
-
- New User
- Posts: 7
- Joined: Mon Jun 05, 2017 1:03 pm
- First Name: sheri
- Last Name: mcpherson
- Company Name: winsupply
- Contact:
Re: Special format of phone number
Thanks for the replies.
I could not continue to use the special format field as it does not validate a US phone number. It will show an error if someone types more than 10 digits, but there is no error if someone types less than 10.
I converted it to a text field and RPG now has to do the checks for me sadly. Green screen would have been a lot easier.
I could not continue to use the special format field as it does not validate a US phone number. It will show an error if someone types more than 10 digits, but there is no error if someone types less than 10.
I converted it to a text field and RPG now has to do the checks for me sadly. Green screen would have been a lot easier.
Who is online
Users browsing this forum: Bing [Bot] and 0 guests