Re: [WebDNA] Data Type Bool

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103142
interpreted = N
texte =
Yeah, you're right of course. Can't believe I didn't see that when I wrote it out. Anyway, Marc's=A0solution = of two searches is what I'd do too.
Terry

p.s so you're saying that [showif anyvalue] will resolve to true? No comparison needed?= This is the first I'm hearing about 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]]
&= gt; [item fields]
> [/hideif]
> [/founditems]
> [/search]
>
> BOO= L 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.
>
> Be aware that something lik= e [showif [instock]=3D1] is
>the same as=20 [showif [instock]] as long as [instock] is
>greater than zero when= an item is actually in stock. It
>helps make the code a little bit more readable, too.
> >
>
>
> On Aug 4, 2009, at 1:39 PM, Terry Wilson wrote:
>
>> So you would h= ave two founditems loops within your
>>search:
>>
>> [search stuff...]
>>=
>> [hideif [instock]=3D0]
>> [founditems]
>> ...
>> [/founditems]
>> [/hide= if]
>>
>> [showif [instock]=3D0]
>> [founditems]
>> ...
>> [/fou= nditems]
>> [/showif]
>>
>> [/search]
>>
>> (sort= by sku, not instock)
>>
>> Terry
>>
>> Essentially, we want our product listing pa= ge to do the
>>following:
>>
>> Group all the items that are in stock first, out of
>>stock sec= ond.
>> Within the in stock items, we want to sort by SKU.
>>
>> Right now, since in stock is= the actual number in stock,
>>it is=20
>> sorting by actual number, not just by what is in stock
&= gt;>and not in
>> stock.
>>
>> -----------
>> Ki Song
>>= ;
>> On Tue, Aug 4, 2009 at 2:13 PM, Govinda
>><<mailto:govinda.webdnatalk@gmail.com
>&= gt; >govinda.webdnatalk@gmail.com> wrote:
>>
>> Ki,
>>
>> I don't think = so.
>>
>> 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.
>&= gt;
>>
>> On Aug 4, 2009, at 12:07 PM, Ki Song - Knifecenter.com
>>wrote:
>>
>= ;> Is something like this possible in a search context:
>>
>> &asSKUsort=3D2&deON HANDs= ort=3D1&ON HANDtype=3Dbool
>>
>> Can a data type be type boolean in a search context?
>>
>&= gt; -----------
>> Ki Song
>>
>>
>> ------------
>> John Bu= tler (Govinda)
>> <mailto:govinda.webdnatalk@gmail.com>govinda.webdnatalk@gmail.com>>
>>
>>
>> ---------------------------------------------------------
>> Thi= s message is sent to you because you are subscribed
>>to
>> the mailing list
>><&l= t;mailto:talk@webdna.us>talk@webdna.us>.
>> To unsubscribe, E-mail to:
>><<mailto:talk-leave@webdna.u= s>talk-leave@webdna.us
>> >
>> archives:
>><http://mail.webdna.us/list/tal= k@webdna.us>http://mail.webdna.us/list/talk@webdna.us
>> old archives:
>><http://dev.webdna.us/TalkListArchive/>ht= tp://dev.webdna.us/TalkListArchive/
>>
>>
>> --
>> Terry Wilson | terry@terryfic.com | http://terryfic.com>> http://WhosComing.com - a simplified, affordable online
>>reservation
>> system
>>= ; 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 subscribed
>>to
= >> the mailing list <talk@webdna.us>.
>> To unsubscribe, E-mail to: <talk-l= eave@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)
Yeah, you're right of course. Can't believe I didn't see that when I wrote it out. Anyway, Marc's=A0solution = of two searches is what I'd do too.
Terry

p.s so you're saying that [showif anyvalue] will resolve to true? No comparison needed?= This is the first I'm hearing about 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]]
&= gt; [item fields]
> [/hideif]
> [/founditems]
> [/search]
>
> BOO= L 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.
>
> Be aware that something lik= e [showif [instock]=3D1] is
>the same as=20 [showif [instock]] as long as [instock] is
>greater than zero when= an item is actually in stock. It
>helps make the code a little bit more readable, too.
> >
>
>
> On Aug 4, 2009, at 1:39 PM, Terry Wilson wrote:
>
>> So you would h= ave two founditems loops within your
>>search:
>>
>> [search stuff...]
>>=
>> [hideif [instock]=3D0]
>> [founditems]
>> ...
>> [/founditems]
>> [/hide= if]
>>
>> [showif [instock]=3D0]
>> [founditems]
>> ...
>> [/fou= nditems]
>> [/showif]
>>
>> [/search]
>>
>> (sort= by sku, not instock)
>>
>> Terry
>>
>> Essentially, we want our product listing pa= ge to do the
>>following:
>>
>> Group all the items that are in stock first, out of
>>stock sec= ond.
>> Within the in stock items, we want to sort by SKU.
>>
>> Right now, since in stock is= the actual number in stock,
>>it is=20
>> sorting by actual number, not just by what is in stock
&= gt;>and not in
>> stock.
>>
>> -----------
>> Ki Song
>>= ;
>> On Tue, Aug 4, 2009 at 2:13 PM, Govinda
>><<mailto:govinda.webdnatalk@gmail.com
>&= gt; >govinda.webdnatalk@gmail.com> wrote:
>>
>> Ki,
>>
>> I don't think = so.
>>
>> 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.
>&= gt;
>>
>> On Aug 4, 2009, at 12:07 PM, Ki Song - Knifecenter.com
>>wrote:
>>
>= ;> Is something like this possible in a search context:
>>
>> &asSKUsort=3D2&deON HANDs= ort=3D1&ON HANDtype=3Dbool
>>
>> Can a data type be type boolean in a search context?
>>
>&= gt; -----------
>> Ki Song
>>
>>
>> ------------
>> John Bu= tler (Govinda)
>> <mailto:govinda.webdnatalk@gmail.com>govinda.webdnatalk@gmail.com>>
>>
>>
>> ---------------------------------------------------------
>> Thi= s message is sent to you because you are subscribed
>>to
>> the mailing list
>><&l= t;mailto:talk@webdna.us>talk@webdna.us>.
>> To unsubscribe, E-mail to:
>><<mailto:talk-leave@webdna.u= s>talk-leave@webdna.us
>> >
>> archives:
>><http://mail.webdna.us/list/tal= k@webdna.us>http://mail.webdna.us/list/talk@webdna.us
>> old archives:
>><http://dev.webdna.us/TalkListArchive/>ht= tp://dev.webdna.us/TalkListArchive/
>>
>>
>> --
>> Terry Wilson | terry@terryfic.com | http://terryfic.com>> http://WhosComing.com - a simplified, affordable online
>>reservation
>> system
>>= ; 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 subscribed
>>to
= >> the mailing list <talk@webdna.us>.
>> To unsubscribe, E-mail to: <talk-l= eave@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:

[Sum] function? (1997) browser info.txt and SSL (1997) Not really WebCat (1997) Help! WebCat2 bug (1997) WebCat2 as a chat server? (1997) Sorting by number (2001) Bad Cookie / Internet Option / Internet Explorer (2004) RE: WebCat and image maps (1997) Alternating colors (1997) New WebCatalog Version !!! (1997) WebMerchant 1.6 and SHTML (1997) charging? (2001) Forms Search Questions (1997) Trouble with formula.db (1997) Two stores, one server (1998) Multiple ShipTo Addresses (2003) Had to share this one... (2002) WebCommerce: Folder organization ? (1997) TeaRoom Order fields email account remain empty even though thewy are filled. (1997) WebCatalog keeps quiting on Solaris, and support isn't su (2000)