Re: ShowIf & HideIf Question?
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16386
interpreted = N
texte = Simon Buchanan wrote:> > Say i have a database like this:> > SKU FIELD1> 001 entry1> 002 entry1> 003 entry2> 004 entry2> 005 entry3> 005 entry3> > What i would like to do is this:> > If FIELD1 = entry2 then show this is an entry2> If FIELD1 = entry3 then show this is an entry3> If FIELD1 ! entry2 or entry3 then show this is neither an entry2 or an> entry3> > Any help would be greatly appreciated. Obviously the database is quite a bit> bigger that this :)how about a case context, ie[case [field1] = texta, textb, textc, textd, default][case1= Show thisif field1 equals texta][case2= Show this if field1 equalstextb][case3 = Show this if field1 equals textc][case4= Show this iffield1 equals textd][default = Show this if nothing matches][/case]Generally, I miss more programming like logic (I like my if/elseclauses).Chris GurscheEC&T
Associated Messages, from the most recent to the oldest:
Simon Buchanan wrote:> > Say i have a database like this:> > SKU FIELD1> 001 entry1> 002 entry1> 003 entry2> 004 entry2> 005 entry3> 005 entry3> > What i would like to do is this:> > If FIELD1 = entry2 then show this is an entry2> If FIELD1 = entry3 then show this is an entry3> If FIELD1 ! entry2 or entry3 then show this is neither an entry2 or an> entry3> > Any help would be greatly appreciated. Obviously the database is quite a bit> bigger that this :)how about a case context, ie[case [field1] = texta, textb, textc, textd, default][case1= Show thisif field1 equals texta][case2= Show this if field1 equalstextb][case3 = Show this if field1 equals textc][case4= Show this iffield1 equals textd][default = Show this if nothing matches][/case]Generally, I miss more programming like logic (I like my if/elseclauses).Chris GurscheEC&T
Chris Gursche
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:
[OT] Domain Name Scam (2000)
Use of Back and Reload Buttons on ShoppingCart page? (1997)
[OT] was SQL Query Question (2001)
WebCat2b13 Command Reference Doc error (1997)
emailer on Windows Beta 18 (1997)
Toronto area? (1999)
BGcolor (1997)
WebDNA tags in WebMerchant email templates ... (1997)
Likelihood of a duplicate (2005)
Webcat Manual and TeaRoom Examples Uses Different Examples. (1997)
Running 2 two WebCatalog.acgi's (1996)
[WebDNA] [store] and [recall]: default db location (2015)
[WebDNA] Set UID/GID/Permissions (2009)
Any way to retrieve information from clipboard? (1998)
I give up!! (1997)
WC2.0 Memory Requirements (1997)
Unknown error: OrderNotCreated (1997)
Multiple prices per product (2004)
max page views Mac can handle (1999)
A quickie question (1997)