Re: Number searching/formats
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16560
interpreted = N
texte = >>>>-------------------- Original Message Follows -------------------->>>>rnpricedata=[form.minprice] [form.maxprice]&pricetype=num>>>>>>>>works great... No problem! However, it does not display records with the>>>>price format including a comma. i.e. 2,999 etc.... if the format is>>>>2999.00, 2999, no problem.>>>>>>>>Is it possible to format the numeric value at the point of input????>>>>>>>>>No, your visitor has complete control over the value that gets entered>>into the form. You have to pass that value to the next page, where you can>>perform your append or replace. Then, instead of putting a simple>>[form.price] tag inside the append or rep>>>>>>lace context, you can put that tag inside a [format] context first. The>>format context can be used to change the form value into the proper format>>*before* it gets placed into the database. Then your comparisons will work>>fine ... :)>>>>>>I played with the format feature right after sending the email, however the>results were:>>price=[format 10.2f][form.price][/format]>>if the value entered was 19,000. the value saved would be 19.00. (BAD)>if the value entered was 19000 the value saved would be 19000.00. (GOOD)>>Any ideas???Sure, don't let your users enter punctuation into that field ... :)Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>>>>-------------------- Original Message Follows -------------------->>>>rnpricedata=[form.minprice] [form.maxprice]&pricetype=num>>>>>>>>works great... No problem! However, it does not display records with the>>>>price format including a comma. i.e. 2,999 etc.... if the format is>>>>2999.00, 2999, no problem.>>>>>>>>Is it possible to format the numeric value at the point of input????>>>>>>>>>No, your visitor has complete control over the value that gets entered>>into the form. You have to pass that value to the next page, where you can>>perform your append or replace. Then, instead of putting a simple>>[form.price] tag inside the append or rep>>>>>>lace context, you can put that tag inside a
[format] context first. The>>format context can be used to change the form value into the proper format>>*before* it gets placed into the database. Then your comparisons will work>>fine ... :)>>>>>>I played with the format feature right after sending the email, however the>results were:>>price=[format 10.2f][form.price][/format]>>if the value entered was 19,000. the value saved would be 19.00. (BAD)>if the value entered was 19000 the value saved would be 19000.00. (GOOD)>>Any ideas???Sure, don't let your users enter punctuation into that field ... :)Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
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:
Re:2nd WebCatalog2 Feature Request (1996)
Cannot calculate prices (1997)
newcart (1997)
PIXO support (1997)
New Command prefs ... (1997)
Online magazine- monthly updates and such (1999)
Banner DNA (1997)
Re:quit command on NT (1997)
Append command (2000)
Mirroring WebCat Servers (2001)
system crashes, event log (1997)
Online SQL Resources (2001)
[WebDNA] Funding for a new v7+ commerce system? (2011)
Multiple prices (1997)
How To question on setting up downloads (1997)
Almost a there but..bye bye NetCloak (1997)
WebMerchant setup (1998)
Major bug report on rootbeer (1997)
Global variables are not always global ... (2000)
checkout.tpl (1999)