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.-GOn 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:
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.-GOn 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:
[WebDNA] To: WSC (2010)
multiple databases (1997)
cart (1997)
[WebDNA] Acceleratin Search / Index Performance in a Formum Service (2013)
Changing cart expiry (1998)
Mondo amounts of Mail [long] (1999)
Date format (2000)
Pithy questions on webcommerce & siteedit (1997)
[WebDNA] Calculate Cube root (2012)
[WebDNA] Ubuntu 16.04.4 LTS (2018)
Nesting format tags (1997)
Hiding HTML and breaking the page (1997)
Re[4]: Charting records by state (2000)
error: Too many nested [xxx] contexts (1997)
Snake Bites (1997)
PCS Frames-Default page is solution! (1997)
How to Display text in empty fields (1997)
SetLineItem (1997)
File commands and Wild Cards ?? (1998)
Max Record length restated as maybe bug (1997)