Re: Hiding Brands

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 57391
interpreted = N
texte = John Peacock wrote: > 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 Well, its all in how you want to skin the cat I guess, I would argue that editing/creating a db (and creating an admin int. for it) takes more effort than using the single [hideif string] .... but that is just my opinion.. My point was that it is really not a contains peram in this case... it should probably have been coded like: [hideif _a_b_c_=_[value]_] Maybe that is why it is undocumented? Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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:

    
  1. Re: Hiding Brands ( Terry Wilson 2004)
  2. Re: Hiding Brands ( William DeVaul 2004)
  3. Re: Hiding Brands ( Clint Davis 2004)
  4. Re: Hiding Brands ( John Peacock 2004)
  5. Re: Hiding Brands ( Donovan Brooke 2004)
  6. Re: Hiding Brands ( John Peacock 2004)
  7. Re: Hiding Brands ( Donovan Brooke 2004)
  8. Re: Hiding Brands ( John Peacock 2004)
  9. Re: Hiding Brands ( Donovan Brooke 2004)
  10. Re: Hiding Brands ( Alan White 2004)
  11. Re: Hiding Brands ( John Peacock 2004)
  12. Re: Hiding Brands ( Alan White 2004)
  13. Re: Hiding Brands ( John Peacock 2004)
  14. Re: Hiding Brands ( Donovan Brooke 2004)
  15. Re: Hiding Brands ( Rob Marquardt 2004)
  16. Hiding Brands ( Alan White 2004)
John Peacock wrote: > 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 Well, its all in how you want to skin the cat I guess, I would argue that editing/creating a db (and creating an admin int. for it) takes more effort than using the single [hideif string] .... but that is just my opinion.. My point was that it is really not a contains peram in this case... it should probably have been coded like: [hideif _a_b_c_=_[value]_] Maybe that is why it is undocumented? Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE Eucalyptus Design <-Web Development (specializing in eCommerce), -> <-Graphic Design, and Pre-Press Consultation -> ADDRESS:> Donovan Brooke DBA Eucalyptus Design N2862 Summerville Park Rd. Lodi, WI 53555 PH:> 1.608.592.3567 Web:> http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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/ Donovan Brooke

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:

Wanted: Broader string manipulation functions (1997) [Webcat 2]Next (1997) My new discussion forum (2003) a little help w/ this .debug error (2000) [search] within [listfiles]? (2003) Plugin or CGI or both (1997) Search/sort in URL Was: GuestBook example (1997) TCPconnect using SSL. If not WebCat, How? (1999) Search and Change (2003) customizing the color of user's pages (1997) Using Plug-In while running 1.6.1 (1997) emailer (1997) Form/HTML Help (2000) Help! WebCat2 bug (1997) turning every 5th line red (1999) [WebDNA] Advanced search 'rq' problem (2013) [WebDNA] TLS 1.2 and [tcpconnect] URGENT (2018) I'm new be kind (1997) counting characters and/or words (1997) Slow [spawn] (2003)