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:

WebDNA Solutions ... (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) Replace Statement (1997) practicing safe queries.. (2000) taxRate is fine but taxTotal isn't (1997) how to determine the actual file format of an image file? (2002) James Hawker (1998) Bug? (1997) multiple search commands (1997) PIXO Support (1997) webcat- multiple selection in input field (1997) [WebDNA] reCAPTCHA and WebDNA (2010) Requiring that certain fields be completed (1997) Math, Multiple Equasions and Show/Hide (1998) [WebDNA] a major shift in strategy? (2008) [WebDNA] WebDNA 8.6.4 (2020) PCS Frames (1997) Search in 2 or more catalogs (1997) Lambada for Macintosh is Here! (1996) WebCat on Alpha? (1997)