Re: [ShowIf] if the varieable exists
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 20334
interpreted = N
texte = >I think that just saying> [Showif [wogroup1datarq]!] Car [/showif]> would work..> basically, if wogroup1datarq doesnt exist, it will be 'blank', and we are>saying ! (not) blank...>>(correct me if im wrong)You might be wrong. Let's be very precise about what it means for avariable to not exist. Some people think that if a field in a databaserecord is blank, then it doesn't exist. In that case, the field exists,but it's blank (contains no text whatsoever). This is very different fromit not existing. I should also point out that if a field contains aspace character ' ', then it is not blank at all -- it contains an actualASCII letter that represents a space.If a tag (or variable or basically any [xxx]) has no meaning in aparticular context, then WebDNA outputs the literal raw text, including thebrackets. This is on purpose and with good reason and is not negotiable(read back in the talklist archives where I had to defend this behaviorrather strenuously).[date] has meaning, gets displayed as 10/9/1998[date1] has no meaning, gets displayed as [date1][hi, my name is fred] has no meaning, gets displayed as [hi, my name is fred][index] has no meaning *in it's current context*, gets displayed as [index][loop start=1&end=10] [index] has meaning inside the loop context, gets displayed as 1, 2, etc.[/loop]Not surprisingly, you will find a discussion of this in the online docsunder the section Contexts.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>I think that just saying> [Showif [wogroup1datarq]!] Car [/showif]> would work..> basically, if wogroup1datarq doesnt exist, it will be 'blank', and we are>saying ! (not) blank...>>(correct me if im wrong)You might be wrong. Let's be very precise about what it means for avariable to not exist. Some people think that if a field in a databaserecord is blank, then it doesn't exist. In that case, the field exists,but it's blank (contains no text whatsoever). This is very different fromit not existing. I should also point out that if a field contains aspace character ' ', then it is not blank at all -- it contains an actualASCII letter that represents a space.If a tag (or variable or basically any [xxx]) has no meaning in aparticular context, then WebDNA outputs the literal raw text, including thebrackets. This is on purpose and with good reason and is not negotiable(read back in the talklist archives where I had to defend this behaviorrather strenuously).
[date] has meaning, gets displayed as 10/9/1998[date1] has no meaning, gets displayed as [date1][hi, my name is fred] has no meaning, gets displayed as [hi, my name is fred][index] has no meaning *in it's current context*, gets displayed as [index][loop start=1&end=10] [index] has meaning inside the loop context, gets displayed as 1, 2, etc.[/loop]Not surprisingly, you will find a discussion of this in the online docsunder the section Contexts.Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Grant Hulbert
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:
Heads up: WebCatalog 4 drops MacTCP, 68K (2000)
[tcpsend] (2001)
Nesting format tags (1997)
Date sorting (1997)
help needed: Non-english characters in WebCatalog (1997)
Migrating to NT (1997)
Caching [include] files ... (1997)
If Empty ? (1997)
Re:Emailer Set Up (1997)
Store Builder Weirdness (1999)
Cancel Subscription (1996)
Download (1999)
[/application] error? (1997)
Protect (1997)
SSL (1998)
Product display (2000)
SKU lookup (1997)
Setting up shop (1997)
tab as word delimiter (2000)
[WebDNA] WebSite Examples (2008)