Re: [WebDNA] Data Type Bool

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103149
interpreted = N
texte =
Then what did you mean when you said:

> Be aware that something like [showif [instock]=3D1] is=A0
>the same= as [showif [instock]] as long as [instock] is=A0
>greater than zero when an item is actually in stock. It=A0>helps make the code a little bit more readable, too.
Terry

On Wed, = 5 Aug 2009 12:25:16 -0500
Patrick McCormick <pm@webdna.us> wrote:
> I'm sorry - you can't just use [showi= f [something]]
>There needs to be some setup work to make this possible.
>
> [math show=3DF&mul= ti=3DT]a=3D1&b=3D2[/math]
> [text show=3DF]compare=3D[raw][a]<[b][/raw][/text]
> [text show=3DF]re= sult=3D[interpret][terd][/interpret][/text]
> [showif [result]]toyboat[/showif]
>
>
> On Aug 5, 20= 09, at 12:00 PM, Terry Wilson wrote:
>
>> Yeah, you're right of course. Can't believe I didn't see >>that when I
>> wrote it out. Anyway, Marc's solution of two searches is
>>what I'd do =
>> too.
>>
>> Terry
>>
>> p.s so you're saying that [showif anyvalue]= will resolve
>>to true? No=20
>> comparison needed? This is the first I'm hearing about
&= gt;>this, and I'm
>> a pretty faithful and long-time reader of the list.
>>
>> On Wed= , 5 Aug 2009 10:40:07 -0500
>> Patrick McCormick <pm@webdna.us> wrote:
>> > Terry & Ki,>> >
>> > I don't think that will work because [instock] is only
>> >evaluated within= the [founditems] loop
>> >
>> > You need:
>> >
>> > [search= stuff...]
>> > [founditems]
>> > [hideif [instock]]
>> > [item f= ields]
>> > [/hideif]
>> > [/founditems]
>> > [/search]
>> >
>>= ; > BOOL is a really cool part of WebDNA. Anything greater
>> >than zero is true and anything 0 or less= is false. That
>> >means that even random strings of text are, technically
>> >true. You need to= avoid bad code practice, but there
>> >are some really clever and graceful things you can do.
>> &g= t;
>> > Be aware that something like [showif [instock]=3D1] is
>> >the same as [showif [insto= ck]] as long as [instock] is
>> >greater than zero when an item is actually in stock. It
>> &= gt;helps make the code a little bit more readable, too.
>> >
>> >
>> >
>= > >
>> > On Aug 4, 2009, at 1:39 PM, Terry Wilson wrote:
>> >
>> >> So you= would have two founditems loops within your
>> >>search:
>> >>
>> >>= ; [search stuff...]
>> >>
>> >> [hideif [instock]=3D0]
>> >>= [founditems]
>> >> ...
>> >> [/founditems]
>> >> [/hideif]
= >> >>
>> >> [showif [instock]=3D0]
>> >> [founditems]
>> >> ...=
>> >> [/founditems]
>> >> [/showif]
>> >>
>> >> [/search]>> >>
>> >> (sort by sku, not instock)
>> >>
>> >> Terry
&= gt;> >>
>> >> Essentially, we want our product listing page to do
>>the
&g= t;> >>following:
>> >>
>> >> Group all the items that are in stock first= , out of
>> >>stock second.
>> >> Within the in stock items, we want to sort b= y SKU.
>> >>
>> >> Right now, since in stock is the actual number in
>>st= ock,
>> >>it is
>> >> sorting by actual number, not just by what is in
>>sto= ck
>> >>and not in
>> >> stock.
>> >>
>> >> -----------
= >> >> Ki Song
>> >>
>> >> On Tue, Aug 4, 2009 at 2:13 PM, Govinda
= >> >><<mailto:govinda.webdnatalk@gmail.com
>> >> >govinda.webdnatalk@gmail.com> wrote:
>> >>=
>> >> Ki,
>> >>
>> >> I don't think so.
>> >>
&= gt;> >> But with webdna you don't need it either. If you are
>> >>not able to do
>> >= > what you want, then post the problem, someone will
>> >>surely guide you
>> >> to= the solution.
>> >>
>> >>
>> >> On Aug 4, 2009, at 12:07 PM, Ki Song -
= >>Knifecenter.com
>> >>wrote:
>> >>
>> >> Is something lik= e this possible in a search context:
>> >>
>> >> &asSKUsort=3D2&= ;deON HANDsort=3D1&ON HANDtype=3Dbool
>> >>
>> >> Can a data type be type boolean in a search= context?
>> >>
>> >> -----------
>> >> Ki Song
>> >>>> >>
>> >> ------------
>> >> John Butler (Govinda)
>> >&= gt;
>><mailto:govinda.webdnatalk@gmail.com>govinda.webdna= talk@gmail.com
>> >>
>> >>
>> >>
>> >> <= br>>>---------------------------------------------------------
&= gt;> >> This message is sent to you because you are
>>subscrib= ed
>> >>to
>> >> the mailing list
>> >><<mailto:talk@webdna.us>tal= k@webdna.us>.
>> >> To unsubscribe, E-mail to:
>> >><<mailto:talk-leave@web= dna.us>talk-leave@webdna.us
>> >> >
>> >> archives:
>> >><http= ://mail.webdna.us/list/talk@webdna.us>http://mail.webdna.us/list/talk@= webdna.us
>> >> old archives:
>> >><http://dev.webdna.us/TalkL= istArchive/>http://dev.webdna.us/TalkListArchive/
>> >>
>> >>
>> >> --
>> >>= ; Terry Wilson | terry@terryfic.com |
>>http://terryfic.com
>> >> http://WhosComing.co= m - a simplified, affordable
>>online
>> >>reservation
>> >> s= ystem
>> >> http://TightJacket.com -- stylish protection for your
>> >>= ;laptop
>> >>
>> -------------------------------------------------------------------------= -
>> >> Attitude is the only difference between ordeal and
>> >>adventure.
>> = >>
>>----------------------------------------------------= -----
>> >> This message is sent to you because you are
>>subscrib= ed
>> >>to
>> >> the mailing list <talk@webdna.us>.
>> >> To unsubscr= ibe, E-mail to: <talk-leave@webdna.us>
>> >> archives: http://mail.webdna.us/list/talk@webdna.us
>> = >> old archives: http://dev.webdna.us/TalkListArchive/
>> >
>>
>= ;>
>

=A0
Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Data Type Bool (John Butler 2009)
  2. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  3. Re: [WebDNA] Data Type Bool (Brian Fries 2009)
  4. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  5. Re: [WebDNA] Data Type Bool (Govinda 2009)
  6. Re: [WebDNA] Data Type Bool ("Terry Wilson" 2009)
  7. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  8. Re: [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
  9. Re: [WebDNA] Data Type Bool ("Terry Wilson" 2009)
  10. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  11. Re: [WebDNA] Data Type Bool (Donovan Brooke 2009)
  12. Re: [WebDNA] Data Type Bool (Marc Thompson 2009)
  13. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  14. Re: [WebDNA] Data Type Bool (Marc Thompson 2009)
  15. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  16. Re: [WebDNA] Data Type Bool (Terry Wilson 2009)
  17. Re: [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
  18. Re: [WebDNA] Data Type Bool (Govinda 2009)
  19. [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
Then what did you mean when you said:

> Be aware that something like [showif [instock]=3D1] is=A0
>the same= as [showif [instock]] as long as [instock] is=A0
>greater than zero when an item is actually in stock. It=A0>helps make the code a little bit more readable, too.
Terry

On Wed, = 5 Aug 2009 12:25:16 -0500
Patrick McCormick <pm@webdna.us> wrote:
> I'm sorry - you can't just use [showi= f [something]]
>There needs to be some setup work to make this possible.
>
> [math show=3DF&mul= ti=3DT]a=3D1&b=3D2[/math]
> [text show=3DF]compare=3D[raw][a]<[b][/raw][/text]
> [text show=3DF]re= sult=3D[interpret][terd][/interpret][/text]
> [showif [result]]toyboat[/showif]
>
>
> On Aug 5, 20= 09, at 12:00 PM, Terry Wilson wrote:
>
>> Yeah, you're right of course. Can't believe I didn't see >>that when I
>> wrote it out. Anyway, Marc's solution of two searches is
>>what I'd do =
>> too.
>>
>> Terry
>>
>> p.s so you're saying that [showif anyvalue]= will resolve
>>to true? No=20
>> comparison needed? This is the first I'm hearing about
&= gt;>this, and I'm
>> a pretty faithful and long-time reader of the list.
>>
>> On Wed= , 5 Aug 2009 10:40:07 -0500
>> Patrick McCormick <pm@webdna.us> wrote:
>> > Terry & Ki,>> >
>> > I don't think that will work because [instock] is only
>> >evaluated within= the [founditems] loop
>> >
>> > You need:
>> >
>> > [search= stuff...]
>> > [founditems]
>> > [hideif [instock]]
>> > [item f= ields]
>> > [/hideif]
>> > [/founditems]
>> > [/search]
>> >
>>= ; > BOOL is a really cool part of WebDNA. Anything greater
>> >than zero is true and anything 0 or less= is false. That
>> >means that even random strings of text are, technically
>> >true. You need to= avoid bad code practice, but there
>> >are some really clever and graceful things you can do.
>> &g= t;
>> > Be aware that something like [showif [instock]=3D1] is
>> >the same as [showif [insto= ck]] as long as [instock] is
>> >greater than zero when an item is actually in stock. It
>> &= gt;helps make the code a little bit more readable, too.
>> >
>> >
>> >
>= > >
>> > On Aug 4, 2009, at 1:39 PM, Terry Wilson wrote:
>> >
>> >> So you= would have two founditems loops within your
>> >>search:
>> >>
>> >>= ; [search stuff...]
>> >>
>> >> [hideif [instock]=3D0]
>> >>= [founditems]
>> >> ...
>> >> [/founditems]
>> >> [/hideif]
= >> >>
>> >> [showif [instock]=3D0]
>> >> [founditems]
>> >> ...=
>> >> [/founditems]
>> >> [/showif]
>> >>
>> >> [/search]>> >>
>> >> (sort by sku, not instock)
>> >>
>> >> Terry
&= gt;> >>
>> >> Essentially, we want our product listing page to do
>>the
&g= t;> >>following:
>> >>
>> >> Group all the items that are in stock first= , out of
>> >>stock second.
>> >> Within the in stock items, we want to sort b= y SKU.
>> >>
>> >> Right now, since in stock is the actual number in
>>st= ock,
>> >>it is
>> >> sorting by actual number, not just by what is in
>>sto= ck
>> >>and not in
>> >> stock.
>> >>
>> >> -----------
= >> >> Ki Song
>> >>
>> >> On Tue, Aug 4, 2009 at 2:13 PM, Govinda
= >> >><<mailto:govinda.webdnatalk@gmail.com
>> >> >govinda.webdnatalk@gmail.com> wrote:
>> >>=
>> >> Ki,
>> >>
>> >> I don't think so.
>> >>
&= gt;> >> But with webdna you don't need it either. If you are
>> >>not able to do
>> >= > what you want, then post the problem, someone will
>> >>surely guide you
>> >> to= the solution.
>> >>
>> >>
>> >> On Aug 4, 2009, at 12:07 PM, Ki Song -
= >>Knifecenter.com
>> >>wrote:
>> >>
>> >> Is something lik= e this possible in a search context:
>> >>
>> >> &asSKUsort=3D2&= ;deON HANDsort=3D1&ON HANDtype=3Dbool
>> >>
>> >> Can a data type be type boolean in a search= context?
>> >>
>> >> -----------
>> >> Ki Song
>> >>>> >>
>> >> ------------
>> >> John Butler (Govinda)
>> >&= gt;
>><mailto:govinda.webdnatalk@gmail.com>govinda.webdna= talk@gmail.com
>> >>
>> >>
>> >>
>> >> <= br>>>---------------------------------------------------------
&= gt;> >> This message is sent to you because you are
>>subscrib= ed
>> >>to
>> >> the mailing list
>> >><<mailto:talk@webdna.us>tal= k@webdna.us>.
>> >> To unsubscribe, E-mail to:
>> >><<mailto:talk-leave@web= dna.us>talk-leave@webdna.us
>> >> >
>> >> archives:
>> >><http= ://mail.webdna.us/list/talk@webdna.us>http://mail.webdna.us/list/talk@= webdna.us
>> >> old archives:
>> >><http://dev.webdna.us/TalkL= istArchive/>http://dev.webdna.us/TalkListArchive/
>> >>
>> >>
>> >> --
>> >>= ; Terry Wilson | terry@terryfic.com |
>>http://terryfic.com
>> >> http://WhosComing.co= m - a simplified, affordable
>>online
>> >>reservation
>> >> s= ystem
>> >> http://TightJacket.com -- stylish protection for your
>> >>= ;laptop
>> >>
>> -------------------------------------------------------------------------= -
>> >> Attitude is the only difference between ordeal and
>> >>adventure.
>> = >>
>>----------------------------------------------------= -----
>> >> This message is sent to you because you are
>>subscrib= ed
>> >>to
>> >> the mailing list <talk@webdna.us>.
>> >> To unsubscr= ibe, E-mail to: <talk-leave@webdna.us>
>> >> archives: http://mail.webdna.us/list/talk@webdna.us
>> = >> old archives: http://dev.webdna.us/TalkListArchive/
>> >
>>
>= ;>
>

=A0
"Terry Wilson"

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:

multipart part 2 (2004) summ=T (2003) Nesting [ListFiles] (1998) Summary search -- speed (1997) [shownext] and descending order (1997) [date] tag not working on mac 4.0.1 (2000) WebCatalog for Postcards ? (1997) Single Link browsing (1997) Webstar 1.3.1 PPC (1997) Re:2nd WebCatalog2 Feature Request (1996) flushdatabases (2000) Setheader question (1999) Hiding HTML and breaking the page (1997) default value from Lookup (1997) Here we go again...WebDNA - SQL- Clustering (2006) Cart Database (1999) method of payment (1997) SSL and reg web* (1997) WebCat2b13 Command Reference Doc error (1997) WC Database Format (1997)