Re: Normalizing Dates and Phone numbers
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 26728
interpreted = N
texte = At 9:26 PM -0800 2000/01/29, Chuck Rice wrote:>At 5:00 PM -1000 2000/01/29, Kenneth Grome wrote:>>>Here, use this database with the convertchars context. It will get rid of everything that's not a number, then you can format the resulting string of digits with some getchars contexts ... or you can leave the resulting string as it is, which will result in 4085551212 based on your examples above:>>Thanks! Here is what I came up with. Seems to handle most cases. -Chuck->>[!]>[\!][GetChars start=8&end=10&from=end]00000000000[ConvertChars db=Strip.db][var1][/ConvertChars][/GetChars]-[!]>[\!][GetChars start=5&end=7&from=end]00000000000[ConvertChars db=Strip.db][var1][/ConvertChars][/GetChars]-[!]>[\!][GetChars start=1&end=4&from=end]00000000000[ConvertChars db=Strip.db][var1][/ConvertChars][/GetChars]Ok, Now I am confused again. The above works for output, but I need to process theinput from a field before it gets written to the database.I put the above code in an include file called -NormalizePhone and set it up so I could invoke it with: [include file=-NormalizePhone&var1=[HPhone]]My input field is in a form Which then invokes a completion routine that has:[showif [action]=Replace][replace db=AddressBook.db&eqSKUdatarq=[url][sku][/url]] [!][\!][formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables] [!][\!][/replace]
Record Replaced[commitdatabase db=AddressBook.db][/showif]In it. Where do I put the include to change the phone number? It seems to be in the formvariables.Something is not adding up here. I must be missing something basic. -Chuck-__________________________________________________________________________Chuck Rice
-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
At 9:26 PM -0800 2000/01/29, Chuck Rice wrote:>At 5:00 PM -1000 2000/01/29, Kenneth Grome wrote:>>>Here, use this database with the convertchars context. It will get rid of everything that's not a number, then you can format the resulting string of digits with some getchars contexts ... or you can leave the resulting string as it is, which will result in 4085551212 based on your examples above:>>Thanks! Here is what I came up with. Seems to handle most cases. -Chuck->>[!]>[\!][GetChars start=8&end=10&from=end]00000000000[ConvertChars db=Strip.db][var1][/ConvertChars][/GetChars]-[!]>[\!][GetChars start=5&end=7&from=end]00000000000[ConvertChars db=Strip.db][var1][/ConvertChars][/GetChars]-[!]>[\!][GetChars start=1&end=4&from=end]00000000000[ConvertChars db=Strip.db][var1][/ConvertChars][/GetChars]Ok, Now I am confused again. The above works for output, but I need to process theinput from a field before it gets written to the database.I put the above code in an include file called -NormalizePhone and set it up so I could invoke it with: [include file=-NormalizePhone&var1=[HPhone]]My input field is in a form Which then invokes a completion routine that has:[showif [action]=Replace][replace db=AddressBook.db&eqSKUdatarq=[url][sku][/url]] [!][\!][formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables] [!][\!][/replace]Record Replaced
[commitdatabase db=AddressBook.db][/showif]In it. Where do I put the include to change the phone number? It seems to be in the formvariables.Something is not adding up here. I must be missing something basic. -Chuck-__________________________________________________________________________Chuck Rice -------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Chuck Rice
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Credit Card Gateways (2005)
Orders.db Update (2003)
[WebDNA] WebCatalog process dies (2012)
CommandSecurity? (1997)
Moment of Thanks (1997)
HELP WITH DATES (1997)
Access Denied! But why? (1997)
emailer truncates last letter! (1997)
WebCat2: Formulas.db question (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Word wrapping (1997)
Use of Back and Reload Buttons on ShoppingCart page? (1997)
Show items based on login Password (2003)
Multiple Merchant Accounts? (1997)
Trouble with emailer (2000)
summ=T (2003)
Help HTML reader (1999)
Looking for a host (1997)
WCS Newbie question (1997)
GuestBook example (1997)