Re: [WebDNA] using ^ within [showif] and [hideif]
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 112211
interpreted = N
texte = This is a multi-part message in MIME format.--------------010602070807050505090108Content-Type: text/plain; charset=windows-1252; format=flowedContent-Transfer-Encoding: 7bitSteve,It has to do with how you read the test condition.When using the test "contains" test condition (that's the ^) I find it's always best to actually read the condition out lound so as not to get confused.so...[showif |[var]|^|1|2|3|]would be read asshow this if the string "|2|" contains the string "|1|2|3|"When you look at it that way you can see that the "contains" test will fail.Flip it around and then you have...show this if the string "|1|2|3|" contains the string "|2|"When you look at it that way you can see the larger string of characters certainly does include the smaller string.Hope that helps.-MattOn 3/25/2015 1:54 PM, Steve Raslevich wrote:> Hello,>> I found this a long time ago but never understood it. Can someone > explain why the first [showif] below does not work?>>>
Var: [text show=t]var=2[/text]>>
A:> [showif |[var]|^|1|2|3|]> Oops!> [/showif]>>
B:> [showif |1|2|3|^|[var]|]> Works!> [/showif]>>
C:> [showif [var]=2]> Works!> [/showif]>>
D:> [showif 2=[var]]> Works!> [/showif]>> Thanks,> Steve>> --------------------------------------------------------- This message > is sent to you because you are subscribed to the mailing list . To > unsubscribe, E-mail to: archives: > http://mail.webdna.us/list/talk@webdna.us Bug Reporting: > support@webdna.us> -- > Matthew A Perosi> Corporate Consultant> Mobile Marketing Expert> Senior Web Developer> SEO Analyst & Educator> matt@psiprime.com>> Psi Prime> 323 Union Blvd.> Totowa, NJ 07512>> Direct: 888.872.0274> Fax: 888.488.5924>> http://www.perosi.com--------------010602070807050505090108Content-Type: text/html; charset=windows-1252Content-Transfer-Encoding: 7bit
Steve,
It has to do with how you read the test condition.
When using the test "contains" test condition (that's the ^) I find it's always best to actually read the condition out lound so as not to get confused.
so...
[showif |[var]|^|1|2|3|]
would be read as
show this if the string "|2|" contains the string "|1|2|3|"
When you look at it that way you can see that the "contains" test will fail.
Flip it around and then you have...
show this if the string "|1|2|3|" contains the string "|2|"
When you look at it that way you can see the larger string of characters certainly does include the smaller string.
Hope that helps.
-Matt
On 3/25/2015 1:54 PM, Steve Raslevich wrote:
Hello,
I found this a long time ago but never understood it. Can someone explain why the first [showif] below does not work?
<br>Var: [text show=t]var=2[/text]
<br>A:
[showif |[var]|^|1|2|3|]
Oops!
[/showif]
<br>B:
[showif |1|2|3|^|[var]|]
Works!
[/showif]
<br>C:
[showif [var]=2]
Works!
[/showif]
<br>D:
[showif 2=[var]]
Works!
[/showif]
Thanks,
Steve
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
-- Matthew A PerosiCorporate ConsultantMobile Marketing ExpertSenior Web DeveloperSEO Analyst & Educatormatt@psiprime.comPsi Prime323 Union Blvd.Totowa, NJ 07512Direct: 888.872.0274Fax: 888.488.5924http://www.perosi.com
--------------010602070807050505090108--
Associated Messages, from the most recent to the oldest:
This is a multi-part message in MIME format.--------------010602070807050505090108Content-Type: text/plain; charset=windows-1252; format=flowedContent-Transfer-Encoding: 7bitSteve,It has to do with how you read the test condition.When using the test "contains" test condition (that's the ^) I find it's always best to actually read the condition out lound so as not to get confused.so...[showif |[var]|^|1|2|3|]would be read asshow this if the string "|2|" contains the string "|1|2|3|"When you look at it that way you can see that the "contains" test will fail.Flip it around and then you have...show this if the string "|1|2|3|" contains the string "|2|"When you look at it that way you can see the larger string of characters certainly does include the smaller string.Hope that helps.-MattOn 3/25/2015 1:54 PM, Steve Raslevich wrote:> Hello,>> I found this a long time ago but never understood it. Can someone > explain why the first
[showif] below does not work?>>>
Var: [text show=t]var=2[/text]>>
A:> [showif |[var]|^|1|2|3|]> Oops!> [/showif]>>
B:> [showif |1|2|3|^|[var]|]> Works!> [/showif]>>
C:> [showif [var]=2]> Works!> [/showif]>>
D:> [showif 2=[var]]> Works!> [/showif]>> Thanks,> Steve>> --------------------------------------------------------- This message > is sent to you because you are subscribed to the mailing list . To > unsubscribe, E-mail to: archives: > http://mail.webdna.us/list/talk@webdna.us Bug Reporting: > support@webdna.us> -- > Matthew A Perosi> Corporate Consultant> Mobile Marketing Expert> Senior Web Developer> SEO Analyst & Educator> matt@psiprime.com>> Psi Prime> 323 Union Blvd.> Totowa, NJ 07512>> Direct: 888.872.0274> Fax: 888.488.5924>> http://www.perosi.com--------------010602070807050505090108Content-Type: text/html; charset=windows-1252Content-Transfer-Encoding: 7bit
Steve,
It has to do with how you read the test condition.
When using the test "contains" test condition (that's the ^) I find it's always best to actually read the condition out lound so as not to get confused.
so...
[showif |[var]|^|1|2|3|]
would be read as
show this if the string "|2|" contains the string "|1|2|3|"
When you look at it that way you can see that the "contains" test will fail.
Flip it around and then you have...
show this if the string "|1|2|3|" contains the string "|2|"
When you look at it that way you can see the larger string of characters certainly does include the smaller string.
Hope that helps.
-Matt
On 3/25/2015 1:54 PM, Steve Raslevich wrote:
Hello,
I found this a long time ago but never understood it. Can someone explain why the first [showif] below does not work?
<br>Var: [text show=t]var=2[/text]
<br>A:
[showif |[var]|^|1|2|3|]
Oops!
[/showif]
<br>B:
[showif |1|2|3|^|[var]|]
Works!
[/showif]
<br>C:
[showif [var]=2]
Works!
[/showif]
<br>D:
[showif 2=[var]]
Works!
[/showif]
Thanks,
Steve
--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
-- Matthew A PerosiCorporate ConsultantMobile Marketing ExpertSenior Web DeveloperSEO Analyst & Educatormatt@psiprime.comPsi Prime323 Union Blvd.Totowa, NJ 07512Direct: 888.872.0274Fax: 888.488.5924http://www.perosi.com
--------------010602070807050505090108--
"Matthew A Perosi, Psi Prime"
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:
Password Generator (2004)
purchase.log file (1997)
Is there an alternative to emailer? (1999)
TRAINING videos - Prove IT. (1998)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
Pre-flight public flag (1997)
Identical [Replace] contexts, different results in different directories? (2000)
Using the sendmail command on CGate Pro (Unix) (2000)
delayed email response (2005)
.tmp files (2000)
WebCat2: Items xx to xx shown, etc. (1997)
Summing fields (1997)
Quick Replace Question (2003)
Webcatalog 4.0 - Storebuilder (2000)
calculating time (2002)
I'm new be kind (1997)
Navigator 4.01 (1997)
[WebDNA] Upgrade from OS 10.7.5 WebDNA 6.2 to Mavericks (2013)
[OT] DOD again (2003)
Sorting (1998)