Re: Quickly reordering search results

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37703
interpreted = N
texte = To debug this, I would temporarily replace the square brackets around your replace context tags with parentheses, so that the resulting context will be displayed for your analysis instead of being executed:(replace db=Mailout.db&eqSKUdatarq=[url][sku][/url])[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables](/replace)I have a feeling you are not building the context you think you are building. If I'm reading your email properly, it looks like you're passing in the wrong parameters - one called eqSKUdata that contains the old SKU value, and one called SKU that contains the new SKU value. But, it looks like your REPLACE context would prefer the old SKU in a parameter called SKU and the new SKU in a parameter called _SKU.- brianAt 2:40 PM 8/8/2001, Tim Robinson wrote: >Hi there, > >I'm trying to set up a facility so users can easily change the order >of items in a search page (which is ordered on the SKU value). > >So I've creating a button which says MOVE UP. When the user clicks >it, I want to simply move it up one place in the search order. I've >done this by using [index]. > >I've created a separate variable for each item: > [text show=f][interpret]SKU[index][/interpret]=[SKU][/text] >which has the value of the SKU. > >Then when the user clicks the button, the replace command replaces >the value of the SKU, with one less than the value of the previous >SKU: > >action=replace&eqSKUdata=[SKU]&SKU=[math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math] > >But it doesn't work.... the SKU value is not being replaced with the >new value (therefore, no reordeing is happening). > >All the code is below... it's not exactly rocket science, and seems >like it should be really easy ha ha ha. > >By the way, the SKU is automaticaly created using: > > > > >[search >db=Mailout.db&SKUsort=1&SKUsdir=as&geSKUdata=2&startat=[url][startat][/url]] > >
> > > > > > [founditems] >[text show=f][interpret]SKU[index][/interpret]=[SKU][/text] > > > > > > [/founditems] >
 HEADLINE
[index] - [SKU][HEADLINE][hideif [index]=1] > href=MailoutSearch.tpl?action=replace&eqSKUdata=[SKU]&SKU=[math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math]> > border=0> [/hideif]
> >[/search] > > >then on the page it goes to I have: > >[showif [action]=Replace] >[replace db=Mailout.db&eqSKUdatarq=[url][sku][/url]][formvariables >name=_&exact=F][getchars >start=2][name][/getchars]=[url][value][/url]&[/formvariables][/replace] >Record Replaced
>[commitdatabase db=Mailout.db] >[/showif] > > >All help greatly appreciated!! If there is a better way of doing it, >I'd love to know it.... > >Regards, >Tim > >Tim Robinson >Art Director >imagine online >tim@imagine.com.au >http://www.imagine.com.au > > > >------------------------------------------------------------- >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/-- <= Brian C. Fries, BrainScan Software http://www.brainscansoftware.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. Re: Quickly reordering search results (Brian Fries 2001)
  2. Re: Quickly reordering search results (Kenneth Grome 2001)
  3. Quickly reordering search results (Tim Robinson 2001)
To debug this, I would temporarily replace the square brackets around your replace context tags with parentheses, so that the resulting context will be displayed for your analysis instead of being executed:(replace db=Mailout.db&eqSKUdatarq=[url][sku][/url])[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables](/replace)I have a feeling you are not building the context you think you are building. If I'm reading your email properly, it looks like you're passing in the wrong parameters - one called eqSKUdata that contains the old SKU value, and one called SKU that contains the new SKU value. But, it looks like your REPLACE context would prefer the old SKU in a parameter called SKU and the new SKU in a parameter called _SKU.- brianAt 2:40 PM 8/8/2001, Tim Robinson wrote: >Hi there, > >I'm trying to set up a facility so users can easily change the order >of items in a search page (which is ordered on the SKU value). > >So I've creating a button which says MOVE UP. When the user clicks >it, I want to simply move it up one place in the search order. I've >done this by using [index]. > >I've created a separate variable for each item: > [text show=f][interpret]SKU[index][/interpret]=[SKU][/text] >which has the value of the SKU. > >Then when the user clicks the button, the replace command replaces >the value of the SKU, with one less than the value of the previous >SKU: > >action=replace&eqSKUdata=[SKU]&SKU=[math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math] > >But it doesn't work.... the SKU value is not being replaced with the >new value (therefore, no reordeing is happening). > >All the code is below... it's not exactly rocket science, and seems >like it should be really easy ha ha ha. > >By the way, the SKU is automaticaly created using: > > > > >[search >db=Mailout.db&SKUsort=1&SKUsdir=as&geSKUdata=2&startat=[url][startat][/url]] > >
> > > > > > [founditems] >[text show=f][interpret]SKU[index][/interpret]=[SKU][/text] > > > > > > [/founditems] >
 HEADLINE
[index] - [SKU][url][SKU][/URL]>[HEADLINE][hideif [index]=1] > href=MailoutSearch.tpl?action=replace&eqSKUdata=[SKU]&SKU=[math][interpret][SKU[math][index]-1[/math]]-1[/interpret][/math]> > border=0> [/hideif]
> >[/search] > > >then on the page it goes to I have: > >[showif [action]=Replace] >[replace db=Mailout.db&eqSKUdatarq=[url][sku][/url]][formvariables >name=_&exact=F][getchars >start=2][name][/getchars]=[url][value][/url]&[/formvariables][/replace] >Record Replaced
>[commitdatabase db=Mailout.db] >[/showif] > > >All help greatly appreciated!! If there is a better way of doing it, >I'd love to know it.... > >Regards, >Tim > >Tim Robinson >Art Director >imagine online >tim@imagine.com.au >http://www.imagine.com.au > > > >------------------------------------------------------------- >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/-- <= Brian C. Fries, BrainScan Software http://www.brainscansoftware.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/ Brian Fries

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:

WebCat2 - [SendNews] (1997) cart info (1998) Gettting IPAddress (2001) Webcatalog error, Plug-in for Webstar (1996) database freeze (1997) Multiple Passwords (1997) Sort Order on a page search (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997) WebCat2 Append problem (B14Macacgi) (1997) WCS Newbie question (1997) db access problem after switching to SSL (2001) web delivery (1997) anyone interested in doing an open-source WebCatbasedforum? (2002) Members register & gain access system (1998) [WebDNA] International Characters (2009) Associative lookup style? + bit more (1997) [WebDNA] V8.6 FCGI (2018) NY State Zip Codes & Tax percent (2002) Ready to h[url]!!! (1999) Do .tpls A Max File Size? (1998)