Re: WebCat2 - [format thousands]

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10516
interpreted = N
texte = >>Is [format thousands] smart enough to know when the data it's formatting >>has been preformatted? > >No. You have to feed it a true number without any commas. Apologies to >non-US customers, but for now any numbers you store in your database that >you want to work inside [math] and [format] contexts must be stored using >a decimal point . for fractions rather than a comma. > >You are allowed to _output_ the number with European-style decimal >delimiters by using the [format] context, but the original must be >American-style.Grant, I have a [price] field that I tell my users to enter only numbers into. I put extra instructions on the page to remind them of this. I also put a big bold dollar sign immediately in front of that field on the input form so they will NOT enter a dollar sign themselves. But guess what? They still insist on entering that dollar sign! Some of them also like to enter commas as thousands separators, which I have also told them not to do - but they do it anyways.What would you think of a new function that would remove all non-numeric characters ... except for one or more predefined characters which we as webmasters can set in the WebCatalog Prefs file? This would give us more control over numeric formatting, similar to the way we can preformat the date and time entries now.If I could simply get WebCat2 to strip away all the non-numeric characters except for the decimal point (or if I were European, the comma) for example, then it wouldn't matter what my users insist on placing into my numeric input fields, because everything except the decimal points (or commas) would be stripped away before any other formatting or displaying of those numbers would take place.This would be universally useful for both European and American number systems, because the webmaster could choose the delimiter to leave in - either a period or a comma - and all other non-numeric characters would be stripped away, including dollar signs, etc.Sincerely, Ken ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: WebCat2 - [format thousands] (Kenneth Grome 1997)
  2. Re: WebCat2 - [format thousands] (Grant Hulbert 1997)
  3. Re: WebCat2 - [format thousands] (Kenneth Grome 1997)
  4. Re: WebCat2 - [format thousands] (Grant Hulbert 1997)
  5. WebCat2 - [format thousands] (Kenneth Grome 1997)
>>Is [format thousands] smart enough to know when the data it's formatting >>has been preformatted? > >No. You have to feed it a true number without any commas. Apologies to >non-US customers, but for now any numbers you store in your database that >you want to work inside [math] and [format] contexts must be stored using >a decimal point . for fractions rather than a comma. > >You are allowed to _output_ the number with European-style decimal >delimiters by using the [format] context, but the original must be >American-style.Grant, I have a [price] field that I tell my users to enter only numbers into. I put extra instructions on the page to remind them of this. I also put a big bold dollar sign immediately in front of that field on the input form so they will NOT enter a dollar sign themselves. But guess what? They still insist on entering that dollar sign! Some of them also like to enter commas as thousands separators, which I have also told them not to do - but they do it anyways.What would you think of a new function that would remove all non-numeric characters ... except for one or more predefined characters which we as webmasters can set in the WebCatalog Prefs file? This would give us more control over numeric formatting, similar to the way we can preformat the date and time entries now.If I could simply get WebCat2 to strip away all the non-numeric characters except for the decimal point (or if I were European, the comma) for example, then it wouldn't matter what my users insist on placing into my numeric input fields, because everything except the decimal points (or commas) would be stripped away before any other formatting or displaying of those numbers would take place.This would be universally useful for both European and American number systems, because the webmaster could choose the delimiter to leave in - either a period or a comma - and all other non-numeric characters would be stripped away, including dollar signs, etc.Sincerely, Ken ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Kenneth Grome

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:

Communigate+Webcat (2001) A little syntax help (1997) RE: [WebDNA] Problem saving returned value as a variable (2012) [WebDNA] Re:BCC and/or Character limit [sendmail] (2010) ImageMagick on OSX (2003) WCS Newbie question (1997) [WebDNA] [OT] the "Work in progress" thread. (2009) Cart date/time (2006) Re:2nd WebCatalog2 Feature Request (1996) File Upload (1997) Looking up two prices in database? (1997) BBedit Syntax coloring.... (2000) best way to test for the existence of a parameter in a url (2003) Re:Emailer setup (1997) [format] problem (2001) WebCat2 - storing unformatted date data? (1997) [math] show=F exists? (1997) Re:quit command on NT (1997) Showing unopened cart (1997) emailer w/F2 (1997)