Complex replace Q-not for the timid!!

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35642
interpreted = N
texte = Howdee-I have an admin template that searches for and displays orders to itself based on certain criteria. I can search by a range of dates or name. The default behavior of this template (i.e., when the page is just loaded, without searching by date or name) is to show only unshipped orders . It does this by checking whether the formvariable 'Shipped' is set to True. If not it displays that founditem. When the founditems are displayed, I have a checkbox for 'shipped' and a form whose action is the page itself. A replace updates orders.db with any changed variables. Example here ---> http://secure.tigernet.net/test/listorders.tplHere's the replace snippet:[showif [made_db_changes]=T] [search db=orders.db[showif [name]=]&group1field=orderdate&group2field=orderdate&gegroup1datarq=[startda te]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimety pe=time[/showif][hideif [name]=]&wonamedata=[name][/hideif]] [founditems] [replace db=orders.db&eqordernamedata=[ordername]]tracknum=[interpret][tracknum[order name]][/interpret]&shipped=[interpret][shipped[ordername]][/interpret]&backo rdered=[interpret][backordered[ordername]][/interpret]&approved=[interpret][ approved[ordername]][/interpret][/replace] [/founditems] [/search] [/showif]and here's the code that provides the founditems for the form:[search db=orders.db[showif [submitted]=T][showif [name]=]&group1field=orderdate&group2field=orderdate&gegroup1datarq=[startda te]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimety pe=time[/showif][/showif][hideif [submitted]=T]&neshippeddata=T&deorderdatesort=1&deordertimesort=2[/hideif][ hideif [name]=]&wonamedata=[name][/hideif]]This 'does the right thing' (to borrow a phrase) when I've displayed founditems based an a search by dates or name. Quickly, what's going on here is the replace 'sees' what has been fed it by the search criteria, which are modified by either searching for a range of dates or name.However, I need a snippet that'll modify the search surrounding the [replace] when I've made changes after the page has loaded in the default state so that the [replace] will function properly. But, I can think of no way to do this.Anyone? -- Will Starck Product and Technical Support NovaDerm.com http://www.novaderm.com techs@novaderm.com Toll free support line: 800-378-1740> From: Peter Werno > Reply-To: (WebCatalog Talk) > Date: Thu, 03 Aug 2000 08:34:33 > To: (WebCatalog Talk) > Subject: Re: Sort Issues > > Jesse, > > probably not a nice way, but I am using a separate field in the Database > (which I usually call sth like fldNumDate), in which I store > [math]{[date]}[/math]. > This field is then a numeric field and can be sorted as you like using > fldNumDatetype=num. > > Also, you could use broken dates here such as > [math]{[date]} + ({[time]} / 86400)[/math] which will be sortable by > date & time. > > Ciao, > > Pete > > On Wed, 2 Aug 2000 23:29:10 > Jesse Proudman (Lists Account) wrote: >> Sort issue. >> >> Here is my search: >> >> [search >> db=data/db/press.db&geSEARCHDATEdata=1/1/80&SEARCHDATEtype=date&SEARCHDATEsd >> ir=as&SEARCHDATEsort=1&max=3] >> >> and I've also tried: >> >> [search >> db=data/db/press.db&geSEARCHDATEdata=1/1/80&SEARCHDATEtype=date&SEARCHDATEsd >> ir=de&SEARCHDATEsort=1&max=3] >> >> but both sort the records in the same manner? >> >> I'm searching via date and I want the latest record to show first? >> >> Any ideas? If this one is obvious, im retiring for the night. :P >> >> Jesse Proudman - NineWire Digital Solutions >> http://www.ninewire.com <> jesse@ninewire.com >> Innovative and Creative Digital Solutions >> >> ****************************************************************** >> * NineWire Productions and Digital Speed Networks, have merged!! * >> * We are now known as NineWire Digital Solutions! * >> ****************************************************************** >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://search.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Complex replace Q-not for the timid!! (Will Starck 2000)
Howdee-I have an admin template that searches for and displays orders to itself based on certain criteria. I can search by a range of dates or name. The default behavior of this template (i.e., when the page is just loaded, without searching by date or name) is to show only unshipped orders . It does this by checking whether the formvariable 'Shipped' is set to True. If not it displays that founditem. When the founditems are displayed, I have a checkbox for 'shipped' and a form whose action is the page itself. A replace updates orders.db with any changed variables. Example here ---> http://secure.tigernet.net/test/listorders.tplHere's the replace snippet:[showif [made_db_changes]=T] [search db=orders.db[showif [name]=]&group1field=orderdate&group2field=orderdate&gegroup1datarq=[startda te]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimety pe=time[/showif][hideif [name]=]&wonamedata=[name][/hideif]] [founditems] [replace db=orders.db&eqordernamedata=[ordername]]tracknum=[interpret][tracknum[order name]][/interpret]&shipped=[interpret][shipped[ordername]][/interpret]&backo rdered=[interpret][backordered[ordername]][/interpret]&approved=[interpret][ approved[ordername]][/interpret][/replace] [/founditems] [/search] [/showif]and here's the code that provides the founditems for the form:[search db=orders.db[showif [submitted]=T][showif [name]=]&group1field=orderdate&group2field=orderdate&gegroup1datarq=[startda te]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimety pe=time[/showif][/showif][hideif [submitted]=T]&neshippeddata=T&deorderdatesort=1&deordertimesort=2[/hideif][ hideif [name]=]&wonamedata=[name][/hideif]]This 'does the right thing' (to borrow a phrase) when I've displayed founditems based an a search by dates or name. Quickly, what's going on here is the replace 'sees' what has been fed it by the search criteria, which are modified by either searching for a range of dates or name.However, I need a snippet that'll modify the search surrounding the [replace] when I've made changes after the page has loaded in the default state so that the [replace] will function properly. But, I can think of no way to do this.Anyone? -- Will Starck Product and Technical Support NovaDerm.com http://www.novaderm.com techs@novaderm.com Toll free support line: 800-378-1740> From: Peter Werno > Reply-To: (WebCatalog Talk) > Date: Thu, 03 Aug 2000 08:34:33 > To: (WebCatalog Talk) > Subject: Re: Sort Issues > > Jesse, > > probably not a nice way, but I am using a separate field in the Database > (which I usually call sth like fldNumDate), in which I store > [math]{[date]}[/math]. > This field is then a numeric field and can be sorted as you like using > fldNumDatetype=num. > > Also, you could use broken dates here such as > [math]{[date]} + ({[time]} / 86400)[/math] which will be sortable by > date & time. > > Ciao, > > Pete > > On Wed, 2 Aug 2000 23:29:10 > Jesse Proudman (Lists Account) wrote: >> Sort issue. >> >> Here is my search: >> >> [search >> db=data/db/press.db&geSEARCHDATEdata=1/1/80&SEARCHDATEtype=date&SEARCHDATEsd >> ir=as&SEARCHDATEsort=1&max=3] >> >> and I've also tried: >> >> [search >> db=data/db/press.db&geSEARCHDATEdata=1/1/80&SEARCHDATEtype=date&SEARCHDATEsd >> ir=de&SEARCHDATEsort=1&max=3] >> >> but both sort the records in the same manner? >> >> I'm searching via date and I want the latest record to show first? >> >> Any ideas? If this one is obvious, im retiring for the night. :P >> >> Jesse Proudman - NineWire Digital Solutions >> http://www.ninewire.com <> jesse@ninewire.com >> Innovative and Creative Digital Solutions >> >> ****************************************************************** >> * NineWire Productions and Digital Speed Networks, have merged!! * >> * We are now known as NineWire Digital Solutions! * >> ****************************************************************** >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://search.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Will Starck

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:

Smith Micro - no competition (2000) PHP Live (2005) ooops...WebCatalog [FoundItems] Problem - LONG - (1997) Webmerchant (1999) Java and WebDNA (2002) MacWEEK article help needed (1996) Great product and great job ! (1997) Part Html part WebDNA (1997) Summary search -- speed (1997) E-mailer error codes (1997) how is this possible (2000) restart needed???? (1997) Help! WebCat2 bug (1997) WC2.0 Memory Requirements (1997) Can't load tmpl files (1997) Security (2002) F3 crashing server (1997) New Command prefs ... (1997) Problems with [Search] param - Mac Plugin b15 (1997) WCS Newbie question (1997)