Re: showif field is number
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 15662
interpreted = N
texte = Kenneth Grome wrote:> > >Is their a quick way to do [showif [field] is a number] ?> >> >Will this work? [showif [math][field]+1[/math]!] In other words, if the> >field is non-numeric, the math context will return a blank.> > I think something like this will work, but I don't remember what's> returned, whether it's blank or zero or some unpredictable number.> You'll probably have to play around with this technique to see what> you get ... :)It turns out that WC will return a value for any field *starting* with anumber. It will return the first number it sees, without performing whateverequation you've set up. if [sku]=111abc222defthen [math][sku]+1[/math] will return 111It only increments if it is a pure number.I ended up doing a comparison of the results to determine if it incremented.Pat
Associated Messages, from the most recent to the oldest:
Kenneth Grome wrote:> > >Is their a quick way to do [showif [field] is a number] ?> >> >Will this work? [showif
[math][field]+1[/math]!] In other words, if the> >field is non-numeric, the math context will return a blank.> > I think something like this will work, but I don't remember what's> returned, whether it's blank or zero or some unpredictable number.> You'll probably have to play around with this technique to see what> you get ... :)It turns out that WC will return a value for any field *starting* with anumber. It will return the first number it sees, without performing whateverequation you've set up. if [sku]=111abc222defthen
[math][sku]+1[/math] will return 111It only increments if it is a pure number.I ended up doing a comparison of the results to determine if it incremented.Pat
Pat McCormick
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:
2.0 Info (1997)
Trying to loop for letters (1999)
Frames and WebCat (1997)
PIXO support (1997)
WebCat2b13MacPlugIn - More limits on [include] (1997)
[WebDNA] Authorize working connection... (2019)
warning... Banner Rotation (2000)
HTML Editors (1997)
using tcpconnect with ups.com (2001)
Assigning Serialized Customer Numbers (1997)
Re[3]: Charting records by state (2000)
Postprocessing CCs (2000)
WebCat2: multiple currency support (1997)
Newbie Tax Question (1997)
[BULK] [WebDNA] test (2011)
[WebDNA] Silly question (2009)
Running 2 two WebCatalog.acgi's (1996)
Up and running ... at last !! (1997)
Web*SSL and WebCatalog (1997)
Quick Question About Sorting (1997)