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 itselfbased on certain criteria. I can search by a range of dates or name. Thedefault behavior of this template (i.e., when the page is just loaded,without searching by date or name) is to show only unshipped orders . Itdoes this by checking whether the formvariable 'Shipped' is set to True. Ifnot it displays that founditem. When the founditems are displayed, I have acheckbox for 'shipped' and a form whose action is the page itself. A replaceupdates 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=[startdate]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimetype=time[/showif][hideif [name]=]&wonamedata=[name][/hideif]][founditems][replace db=orders.db&eqordernamedata=[ordername]]tracknum=[interpret][tracknum[ordername]][/interpret]&shipped=[interpret][shipped[ordername]][/interpret]&backordered=[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=[startdate]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimetype=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 displayedfounditems based an a search by dates or name. Quickly, what's going on hereis the replace 'sees' what has been fed it by the search criteria, which aremodified 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 defaultstate so that the [replace] will function properly. But, I can think of noway to do this.Anyone?-- Will StarckProduct and Technical SupportNovaDerm.comhttp://www.novaderm.comtechs@novaderm.comToll 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:
|
- Complex replace Q-not for the timid!! (Will Starck 2000)
|
Howdee-I have an admin template that searches for and displays orders to itselfbased on certain criteria. I can search by a range of dates or name. Thedefault behavior of this template (i.e., when the page is just loaded,without searching by date or name) is to show only unshipped orders . Itdoes this by checking whether the formvariable 'Shipped' is set to True. Ifnot it displays that founditem. When the founditems are displayed, I have acheckbox for 'shipped' and a form whose action is the page itself. A replaceupdates 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=[startdate]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimetype=time[/showif][hideif [name]=]&wonamedata=[name][/hideif]][founditems][replace db=orders.db&eqordernamedata=[ordername]]tracknum=[interpret][tracknum[ordername]][/interpret]&shipped=[interpret][shipped[ordername]][/interpret]&backordered=[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=[startdate]&legroup2datarq=[enddate]&deorderdatesort=1&deordertimesort=2&ordertimetype=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 displayedfounditems based an a search by dates or name. Quickly, what's going on hereis the replace 'sees' what has been fed it by the search criteria, which aremodified 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 defaultstate so that the [replace] will function properly. But, I can think of noway to do this.Anyone?-- Will StarckProduct and Technical SupportNovaDerm.comhttp://www.novaderm.comtechs@novaderm.comToll 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:
[WebDNA] Good advise on [Showif] or alternative... (2012)
FYI: virus alert (1996)
RE: Web*SSL and WebCatalog (1997)
xml - amazon bug and sed q: (2004)
Webcatalog 3.0.8 on PWS (2000)
Is the Finder required? (1998)
Erotic Sites (1997)
Danger of [newcart] (1999)
Backwards list behavior ... (1997)
Max Record length restated as maybe bug (1997)
Problem with encrypted cookies (2000)
Re:[input] context (1999)
Loss in form (1998)
Grep and <> (2005)
Re:Formulas.db / Quantity Discount problem (1998)
WebCatalog on G3 Macs? (1997)
hhtps to http and back? (2000)
system crashes, event log (1997)
[UPPERCASE] (1997)
WebCatalog Mac and cgi-bin (WebSTAR 2.0) (1997)