Re: [WebDNA] [listwords] and [index]

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103195
interpreted = N
texte = IIRC (now) [showif] (and all of webdna's conditionals) do not recognize a comparison operator for 'less/greater than or equal to '. Plus as Donovan said, always (safety first, exceptions second) good to [url] the things you are comparing or using in the various context's params. -G On Aug 9, 2009, at 10:25 AM, Rich Kwas wrote: > > I indicate if an item has reviews at a review site this way in a db: > +rsite1+rsite4+rsite5+rsite7+ > > I want to show one text string if the field contains 1 or 2 entries, > and a different text string if it contains 3 or more entries. > > Can I use [listwords] with [index] ??? > > I've been trying this and variations of it but no real success so far: > > [listwords words=[reviewsites]&delimiters=+] > [showif [index]<=[math]2[/math]]one text line[/showif] > [showif [index]>=[math]3[/math]]another text line[/showif] > [/listwords] > > I'm thinking it's because [index] just counts the lines?? > > > > > I thought [countwords] could do the trick but I always get "1" as a > result: > [CountWords Delimiters=+][reviewsites][/CountWords] > > Is "+" not an accepted Delimiter in Countwords? ------------ John Butler (Govinda) govinda.webdnatalk@gmail.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [listwords] and [index] (John Butler 2009)
  2. Re: Re: [WebDNA] [listwords] and [index] ( 2009)
  3. Re: [WebDNA] [listwords] and [index] ( 2009)
  4. [WebDNA] [listwords] and [index] (Rich Kwas 2009)
IIRC (now) [showif] (and all of webdna's conditionals) do not recognize a comparison operator for 'less/greater than or equal to '. Plus as Donovan said, always (safety first, exceptions second) good to [url] the things you are comparing or using in the various context's params. -G On Aug 9, 2009, at 10:25 AM, Rich Kwas wrote: > > I indicate if an item has reviews at a review site this way in a db: > +rsite1+rsite4+rsite5+rsite7+ > > I want to show one text string if the field contains 1 or 2 entries, > and a different text string if it contains 3 or more entries. > > Can I use [listwords] with [index] ??? > > I've been trying this and variations of it but no real success so far: > > [listwords words=[reviewsites]&delimiters=+] > [showif [index]<=[math]2[/math]]one text line[/showif] > [showif [index]>=[math]3[/math]]another text line[/showif] > [/listwords] > > I'm thinking it's because [index] just counts the lines?? > > > > > I thought [countwords] could do the trick but I always get "1" as a > result: > [CountWords Delimiters=+][reviewsites][/CountWords] > > Is "+" not an accepted Delimiter in Countwords? ------------ John Butler (Govinda) govinda.webdnatalk@gmail.com John Butler

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:

pc (1997) unable to launch acgi in WebCat (1997) RE: [WebDNA] multi-language sites in current versions of webdna? (2010) RAM variables (1997) OK, here goes... (1997) Trouble with formula.db (1997) Replace context problem ... (1997) creator code (1997) Why don't Typhoon & Firesite work together? (and webcat) (1998) Include vs. lookup? (1998) URGENT: Can't email orders - HELP #2 (1998) Updating fields from different platforms (1998) Emailer (1997) help with duplicate records posted (1998) Upgrade to wsV (2004) SSL (1998) Locking up with WebCatalog... (1997) WebCat2b15MacPlugIn - [authenticate] not [protect] (1997) best way to test for the existence of a parameter in a url (2003) Database field limit? (1998)