Re: [WebDNA] Data Type Bool

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103143
interpreted = N
texte = --0016e645ab247a0ba1047068035c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I didn't realize this question would get this much response! Just to give you all an update, we decided to go a different route: Essentially, we added a new field that, instead of having the actual quantity we have in stock, it has a T for instock, and F for out of stock. That field is updated in real time along with the actual quantity number. ----------- Ki Song On Wed, Aug 5, 2009 at 12:44 PM, Patrick McCormick wrote: > Oops - good point. You need at least 2 [founditems] contexts. 2 searches > if the sorting is to be different between the two halves of the list. > > Thanks for the eagle eye Donovan! > > Pat > > > > On Aug 5, 2009, at 11:38 AM, Donovan Brooke wrote: > > Patrick McCormick wrote: >> >>> More completely: >>> [search stuff sorted by SKU] >>> [founditems] >>> [showif [instock] >>> [item fields] >>> [/showif] >>> [hideif [instock]] >>> [item fields] >>> [/hideif] >>> [/founditems] >>> [/search] >>> >> >> >> Well, not quite ;-) You would still need >> two founditems loops as terry suggested to >> reach Ki's goals of displaying the in stock >> items first.. >> but then adding your notion of putting >> [instock] inside the founditems loop.. >> >> [search db=db.db&neSKUdatarq=find_all&asSKUsort=1] >> [founditems] >> [showif [yourstockfield]>0] >> ... >> [/showif] >> [/founditems] >> >> [founditems] >> [showif [yourstockfield]<1] >> ... >> [/showif] >> [/founditems] >> [/search] >> >> >> However, I think Marc's suggestion of 2 searches may >> be faster (not any showif comparisons).. something like: >> >> >> [search db=db.db&asSKUsort=1&grONHANDdatarq=0&ONHANDtype=num] >> [founditems] >> ... >> [/founditems] >> [/search] >> >> [search db=db.db&asSKUsort=1&lsONHANDdatarq=1&ONHANDtype=num] >> [founditems] >> ... >> [/founditems] >> [/search] >> >> >> Note that I changed "ON HAND" to "ONHAND". >> >> Donovan >> >> >> -- >> Donovan Brooke >> WebDNA Software Corporation >> http://www.webdna.us >> **[Square Bracket Utopia]** >> --------------------------------------------------------- >> 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 >> old archives: http://dev.webdna.us/TalkListArchive/ >> > > --0016e645ab247a0ba1047068035c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I didn't realize this question would get this much response!

Jus= t to give you all an update, we decided to go a different route:

Ess= entially, we added a new field that, instead of having the actual quantity = we have in stock, it has a T for instock, and F for out of stock.
That field is updated in real time along with=A0 the actual quantity number= .

-----------
Ki Song


On Wed, Aug 5, 2009 at 12:44 PM, Patrick= McCormick <pm@webdna.= us> wrote:
Oops - good point. =A0You need at least 2 [founditems] contexts. =A02 searc= hes if the sorting is to be different between the two halves of the list.
Thanks for the eagle eye Donovan!

Pat



On Aug 5, 2009, at 11:38 AM, Donovan Brooke wrote:

Patrick McCormick wrote:
More completely:
[search stuff sorted by SKU]
=A0 [founditems]
=A0 =A0 =A0 [showif [instock]
=A0 =A0 =A0 =A0 =A0 [item fields]
=A0 =A0 =A0 [/showif]
=A0 =A0 =A0 [hideif [instock]]
=A0 =A0 =A0 =A0 =A0 [item fields]
=A0 =A0 =A0 [/hideif]
=A0 [/founditems]
[/search]


Well, not quite ;-) You would still need
two founditems loops as terry suggested to
reach Ki's goals of displaying the in stock
items first..
but then adding your notion of putting
[instock] inside the founditems loop..

[search db=3Ddb.db&neSKUdatarq=3Dfind_all&asSKUsort=3D1]
=A0[founditems]
=A0 [showif [yourstockfield]>0]
=A0 =A0 ...
=A0 [/showif]
=A0[/founditems]

=A0[founditems]
=A0 [showif [yourstockfield]<1]
=A0 =A0 ...
=A0 [/showif]
=A0[/founditems]
[/search]


However, I think Marc's suggestion of 2 searches may
be faster (not any showif comparisons).. something like:


[search db=3Ddb.db&asSKUsort=3D1&grONHANDdatarq=3D0&ONHANDtype= =3Dnum]
=A0[founditems]
=A0...
=A0[/founditems]
[/search]

[search db=3Ddb.db&asSKUsort=3D1&lsONHANDdatarq=3D1&ONHANDtype= =3Dnum]
=A0[founditems]
=A0...
=A0[/founditems]
[/search]


Note that I changed "ON HAND" to "ONHAND".

Donovan


--
Donovan Brooke
WebDNA Software Corporation
http://www.webdna.us=
**[Square Bracket Utopia]**
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <ta= lk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
old archives: http://dev.webdna.us/TalkListArchive/


--0016e645ab247a0ba1047068035c-- 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)
--0016e645ab247a0ba1047068035c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I didn't realize this question would get this much response! Just to give you all an update, we decided to go a different route: Essentially, we added a new field that, instead of having the actual quantity we have in stock, it has a T for instock, and F for out of stock. That field is updated in real time along with the actual quantity number. ----------- Ki Song On Wed, Aug 5, 2009 at 12:44 PM, Patrick McCormick wrote: > Oops - good point. You need at least 2 [founditems] contexts. 2 searches > if the sorting is to be different between the two halves of the list. > > Thanks for the eagle eye Donovan! > > Pat > > > > On Aug 5, 2009, at 11:38 AM, Donovan Brooke wrote: > > Patrick McCormick wrote: >> >>> More completely: >>> [search stuff sorted by SKU] >>> [founditems] >>> [showif [instock] >>> [item fields] >>> [/showif] >>> [hideif [instock]] >>> [item fields] >>> [/hideif] >>> [/founditems] >>> [/search] >>> >> >> >> Well, not quite ;-) You would still need >> two founditems loops as terry suggested to >> reach Ki's goals of displaying the in stock >> items first.. >> but then adding your notion of putting >> [instock] inside the founditems loop.. >> >> [search db=db.db&neSKUdatarq=find_all&asSKUsort=1] >> [founditems] >> [showif [yourstockfield]>0] >> ... >> [/showif] >> [/founditems] >> >> [founditems] >> [showif [yourstockfield]<1] >> ... >> [/showif] >> [/founditems] >> [/search] >> >> >> However, I think Marc's suggestion of 2 searches may >> be faster (not any showif comparisons).. something like: >> >> >> [search db=db.db&asSKUsort=1&grONHANDdatarq=0&ONHANDtype=num] >> [founditems] >> ... >> [/founditems] >> [/search] >> >> [search db=db.db&asSKUsort=1&lsONHANDdatarq=1&ONHANDtype=num] >> [founditems] >> ... >> [/founditems] >> [/search] >> >> >> Note that I changed "ON HAND" to "ONHAND". >> >> Donovan >> >> >> -- >> Donovan Brooke >> WebDNA Software Corporation >> http://www.webdna.us >> **[Square Bracket Utopia]** >> --------------------------------------------------------- >> 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 >> old archives: http://dev.webdna.us/TalkListArchive/ >> > > --0016e645ab247a0ba1047068035c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I didn't realize this question would get this much response!

Jus= t to give you all an update, we decided to go a different route:

Ess= entially, we added a new field that, instead of having the actual quantity = we have in stock, it has a T for instock, and F for out of stock.
That field is updated in real time along with=A0 the actual quantity number= .

-----------
Ki Song


On Wed, Aug 5, 2009 at 12:44 PM, Patrick= McCormick <pm@webdna.= us> wrote:
Oops - good point. =A0You need at least 2 [founditems] contexts. =A02 searc= hes if the sorting is to be different between the two halves of the list.
Thanks for the eagle eye Donovan!

Pat



On Aug 5, 2009, at 11:38 AM, Donovan Brooke wrote:

Patrick McCormick wrote:
More completely:
[search stuff sorted by SKU]
=A0 [founditems]
=A0 =A0 =A0 [showif [instock]
=A0 =A0 =A0 =A0 =A0 [item fields]
=A0 =A0 =A0 [/showif]
=A0 =A0 =A0 [hideif [instock]]
=A0 =A0 =A0 =A0 =A0 [item fields]
=A0 =A0 =A0 [/hideif]
=A0 [/founditems]
[/search]


Well, not quite ;-) You would still need
two founditems loops as terry suggested to
reach Ki's goals of displaying the in stock
items first..
but then adding your notion of putting
[instock] inside the founditems loop..

[search db=3Ddb.db&neSKUdatarq=3Dfind_all&asSKUsort=3D1]
=A0[founditems]
=A0 [showif [yourstockfield]>0]
=A0 =A0 ...
=A0 [/showif]
=A0[/founditems]

=A0[founditems]
=A0 [showif [yourstockfield]<1]
=A0 =A0 ...
=A0 [/showif]
=A0[/founditems]
[/search]


However, I think Marc's suggestion of 2 searches may
be faster (not any showif comparisons).. something like:


[search db=3Ddb.db&asSKUsort=3D1&grONHANDdatarq=3D0&ONHANDtype= =3Dnum]
=A0[founditems]
=A0...
=A0[/founditems]
[/search]

[search db=3Ddb.db&asSKUsort=3D1&lsONHANDdatarq=3D1&ONHANDtype= =3Dnum]
=A0[founditems]
=A0...
=A0[/founditems]
[/search]


Note that I changed "ON HAND" to "ONHAND".

Donovan


--
Donovan Brooke
WebDNA Software Corporation
http://www.webdna.us=
**[Square Bracket Utopia]**
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <ta= lk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
old archives: http://dev.webdna.us/TalkListArchive/


--0016e645ab247a0ba1047068035c-- "Ki Song - Knifecenter.com"

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:

Search for specific characters in a string (2005) What am I missing (1997) Searching multiple Databases (1997) using listfiles to build a database? more (2000) and passing to a cart (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) The List is Changing (1997) HTML encoding in URLs (1997) [text] variable assignment within [search] context (2000) About the Allow 'Absolute Path' Prefix (2002) WebCatalog 402rc2 is now available (2001) emailer (1997) Displaying photo attached to first record (1997) Laying an egg. (1998) Search probl. since change WebCatalog from 2.1.3 to 3.0 (1998) take me off mailing list please (2001) [ot] RH 7.2 WU-FTP Question (2003) combining strings (1997) CHMOD recursive for directories (2006) [WebDNA] Math variable name length limitations ... (2012)