Re: [REPLACE] inside [FOUNDITEMS]

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19194
interpreted = N
texte = At 1:29 PM -0800 7/29/98, PCS Technical Support is rumored to have typed: > >Maybe Grant can clarify this, but I don't believe that [replace] will > >change the [index] values (the positions of the rows in the db), just the > >values in the database. > > I believe you are correct. Which means [replace] would be safe, but > perhaps confusing if the side-effect of the replace is that the record no > longer matches the original search criteria, yet it still appears in the > list of found items.Just to clarify, my problem stemmed from the following (where SKU=666, INV=1):[SEARCH db=/my.db&eqSKUdatarq=666] [FOUNDITEMS] [SHOWIF [INV]>0].... [REPLACE db=my.db&eqSKUdatarq=666]INV=[MATH][INV]-1[/MATH][/REPLACE] [/SHOWIF] [HIDEIF [INV]>0]...[/HIDEIF] [/FOUNDITEMS] [/SEARCH]So, the replace caused the contents of both the [SHOWIF] *and* [HIDEIF] to be executed. I simple switch in the order of they [SHOWIF] and [HIDEIF] makes things work fine.So, there's another potential problem that could happen to someone using [REPLACE] in [FOUNDITEMS].MichaelMichael Winston *By e-mail!: michaelw@dhorse.com Internet Coordinator *By web!: http://www.dhorse.com/ Dark Horse Comics, Inc. *By fax!: 503/654/9440 Associated Messages, from the most recent to the oldest:

    
  1. Re: [REPLACE] inside [FOUNDITEMS] (Kenneth Grome 1998)
  2. Re: [REPLACE] inside [FOUNDITEMS] (Peter Ostry 1998)
  3. Re: [REPLACE] inside [FOUNDITEMS] (Michael Winston 1998)
  4. Re: [REPLACE] inside [FOUNDITEMS] (Kenneth Grome 1998)
  5. Re: [REPLACE] inside [FOUNDITEMS] (Bob Minor 1998)
  6. Re: [REPLACE] inside [FOUNDITEMS] (PCS Technical Support 1998)
  7. Re: [REPLACE] inside [FOUNDITEMS] (Michael Winston 1998)
  8. Re: [REPLACE] inside [FOUNDITEMS] (PCS Technical Support 1998)
  9. Re: [REPLACE] inside [FOUNDITEMS] (Dave MacLeay 1998)
  10. Re: [REPLACE] inside [FOUNDITEMS] (PCS Technical Support 1998)
  11. Re: [REPLACE] inside [FOUNDITEMS] (Kenneth Grome 1998)
  12. RE: [REPLACE] inside [FOUNDITEMS] (Olin 1998)
  13. [REPLACE] inside [FOUNDITEMS] (Michael Winston 1998)
  14. Re: [REPLACE] inside [FOUNDITEMS] (Dave MacLeay 1998)
  15. RE: [REPLACE] inside [FOUNDITEMS] (Olin 1998)
At 1:29 PM -0800 7/29/98, PCS Technical Support is rumored to have typed: > >Maybe Grant can clarify this, but I don't believe that [replace] will > >change the [index] values (the positions of the rows in the db), just the > >values in the database. > > I believe you are correct. Which means [replace] would be safe, but > perhaps confusing if the side-effect of the replace is that the record no > longer matches the original search criteria, yet it still appears in the > list of found items.Just to clarify, my problem stemmed from the following (where SKU=666, INV=1):[SEARCH db=/my.db&eqSKUdatarq=666] [founditems] [SHOWIF [INV]>0].... [REPLACE db=my.db&eqSKUdatarq=666]INV=[math][INV]-1[/MATH][/REPLACE] [/SHOWIF] [HIDEIF [INV]>0]...[/HIDEIF] [/FOUNDITEMS] [/SEARCH]So, the replace caused the contents of both the [showif] *and* [hideif] to be executed. I simple switch in the order of they [showif] and [hideif] makes things work fine.So, there's another potential problem that could happen to someone using [replace] in [founditems].MichaelMichael Winston *By e-mail!: michaelw@dhorse.com Internet Coordinator *By web!: http://www.dhorse.com/ Dark Horse Comics, Inc. *By fax!: 503/654/9440 Michael Winston

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:

os 8.5 (1999) Languages (1997) Running _every_ page through WebCat ? (1997) [CART] inside a [LOOP] (1997) Upgrading old WebCat Database Files (1997) Error Lob.db records error message not name (1997) 2.1 bugs left over from beta cycle (1998) Quickie question on the email templates (1997) Getting total number of items ordered (1997) Frames (1997) Problems passing [SKU] with $Replace in 2.0 (1997) user selectable sort order (2000) [showif] results returned... (2003) frames & carts (1997) docs for WebCatalog2 (1997) Problem displaying search result (1997) Field name-subcategory (1997) nested context (1998) append db wierdness (1999) WebCatalog not running after upgrade (2000)