Re: Hiding Brands
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 57385
interpreted = N
texte = Donovan Brooke wrote:> I like to say that this "contains" peram in this implimentation is actually> an "=" because I don't think it will find, for example, "a" in the > "[ID]" field> if the [ID] fields' value is "apple".The only reason that code works is because each term on the left-hand side is the complete term, _including_ the delimiters (in this case '|'). You cannot use it for substring matches.I would actually create a table with all of the terms you wish to suppress, then do something like this (assuming you've already checked [id] for empty):[hideif [LOOKUP db=suppress.db&value=[id]&lookInField=suppress&returnField=suppress¬Found=SHOW]!SHOW](not tested). NOTE that the [hideif] fires in this case only if the [lookup] succeeds; it's a double negative, but it means that the test is always vs a constant string, rather than having [id] on both sides of the equation.This is much easier to maintain, since you don't need to keep editing the template, just add new terms to the table.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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 Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Donovan Brooke wrote:> I like to say that this "contains" peram in this implimentation is actually> an "=" because I don't think it will find, for example, "a" in the > "[ID]" field> if the [ID] fields' value is "apple".The only reason that code works is because each term on the left-hand side is the complete term, _including_ the delimiters (in this case '|'). You cannot use it for substring matches.I would actually create a table with all of the terms you wish to suppress, then do something like this (assuming you've already checked [id] for empty):[hideif [LOOKUP db=suppress.db&value=[id]&lookInField=suppress&returnField=suppress¬Found=SHOW]!SHOW](not tested). NOTE that the [hideif] fires in this case only if the [lookup] succeeds; it's a double negative, but it means that the test is always vs a constant string, rather than having [id] on both sides of the equation.This is much easier to maintain, since you don't need to keep editing the template, just add new terms to the table.John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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 Web Archive of this list is at: http://webdna.smithmicro.com/
John Peacock
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:
Width & Height (1998)
SPAM (OT) (2004)
[format 40s]text[/format] doesn't work (1997)
BGcolor (1997)
[WebDNA] Website (2017)
Prevent multiple appends with Reload Button (1997)
emailer (1997)
[WebDNA] WebDNA fastCGI beta versions (2010)
Searching multiple Databases (1997)
Incorrect Value Display (2000)
How to include weather (2000)
Another webcatalog site!! (1997)
Netscape (1997)
no global [username] or [password] displayed ... (1997)
More questions about serial number dishing (1997)
writefile on OSX (2004)
Adding headers to email (1997)
unable to launch acgi in WebCat (1997)
WebDna Consultants (2004)
Secure server question (1997)