Re: [WebDNA] using ^ within [showif] and [hideif]

This WebDNA talk-list message is from

2015


It keeps the original formatting.
numero = 112212
interpreted = N
texte = This is a multi-part message in MIME format. --------------010902030508010902050708 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Thanks Matt! I need to talk out loud to myself more often :) Matthew A Perosi, Psi Prime wrote: > 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? >> >> >>
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 > --------------------------------------------------------- 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 --------------010902030508010902050708 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks Matt!=A0 I need to talk out loud to myself more often=A0 :)

Matthew A Perosi, Psi Prime wrote:
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=3Dt]var=3D2[/text]

<br>A:
[showif |[var]|^|1|2|3|]
Oops!
[/showif]

<br>B:
[showif |1|2|3|^|[var]|]
Works!
[/showif]

<br>C:
[showif [var]=3D2]
Works!
[/showif]

<br>D:
[showif 2=3D[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: sup= port@webdna.us
--=20Matthew 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
--------------------------------------------------------- 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
--------------010902030508010902050708-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] using ^ within [showif] and [hideif] (Steve Raslevich 2015)
  2. Re: [WebDNA] using ^ within [showif] and [hideif] ("Matthew A Perosi, Psi Prime" 2015)
  3. [WebDNA] using ^ within [showif] and [hideif] (Steve Raslevich 2015)
This is a multi-part message in MIME format. --------------010902030508010902050708 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Thanks Matt! I need to talk out loud to myself more often :) Matthew A Perosi, Psi Prime wrote: > 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? >> >> >>
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 > --------------------------------------------------------- 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 --------------010902030508010902050708 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Thanks Matt!=A0 I need to talk out loud to myself more often=A0 :)

Matthew A Perosi, Psi Prime wrote:
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=3Dt]var=3D2[/text]

<br>A:
[showif |[var]|^|1|2|3|]
Oops!
[/showif]

<br>B:
[showif |1|2|3|^|[var]|]
Works!
[/showif]

<br>C:
[showif [var]=3D2]
Works!
[/showif]

<br>D:
[showif 2=3D[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: sup= port@webdna.us
--=20Matthew 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
--------------------------------------------------------- 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
--------------010902030508010902050708-- Steve Raslevich

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:

FW: Shipping calculations (1997) Switching to Linux (2000) Using EIMS instead of Emailer (1998) Hiding HTML and breaking the page (1997) F2 to F3 rocky transition (1997) [cart] not being interpreted inside [founditems] (1997) WebDNA 4.5.1 on Tiger Server (2005) service stop and restart (1997) WebCat2 several catalogs? (1997) Rename folder under WC3 (2000) Math, Multiple Equasions and Show/Hide (1998) I can help! (1996) [format xs] freeze (1997) lookups or math? (1998) taxrate - off by 1 cent (1997) [WebDNA] REPLACE INCLUDE FILE (2019) Hideifs / Showifs (2000) ampersand (1998) textarea inputs and returns (1999) CyberCash Transaction Cost (1999)