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:

AppleScript question (1997) remotely add + sign (1997) Tron? (2008) Merging databases (1997) Problems passing [SKU] with $Replace in 2.0 (1997) Trouble with formula.db (1997) How To Install (2003) Pithy questions on webcommerce & siteedit (1997) webcat NT (1998) Which GUI HTML editors work with WC ? (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) Pithy questions on webcommerce & siteedit (1997) WebCat for mass emailings (1997) Authentication (1998) Not really WebCat (1997) cookies crumbling (1999) Search inside Include (1998) Apache on windows and WebDNA (2004) [WebDNA] Authorize working connection... (2020) OS X Problem... (2000)