Re: selectively replacing records within a [founditems]

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 26299
interpreted = N
texte = >If I want to replace a record of a db within a [founditems] context which finds that >same record, and I have all the fieldname/value pairs in the [replace] context equal >to themselves (i.e. the values of the db fields are set to equal those found by the >search context), but I want to replace a few of the db field's values WITHOUT having >to use names for the formvariables which are NOT the same as the db fieldname, then >do you think using the following technique is reliable and recommended? - > >(extra carriage returns thrown in for readability) > >[Founditems] >[replace db=Orders.db&eqOrderIDdatarq=[OrderID]] >StaticVar1=[StaticVar1] >&StaticVar2=[StaticVar2] >&StaticVar3=[StaticVar3] >&ChangingVarValue1=[URL][FormVariables >name=ChangingVarValue1&exact=T][value][/FormVariables][/URL] >[/replace] >[/Founditems] > >Will that always ensure that I get the value that was passed from the form in for >ChangingVarValue1, rather than the value for ChangingVarValue1 that was already in >the db?Yes.But remember, if you're not changing StaticVar1 or StaticVar2 or StaticVar3, you don't need them in the replace context -- because webcat replaces only the fields named in the replace context, and it leaves the other fields as they are alone. So this is all the code you need:[Founditems] [replace db=Orders.db&eqOrderIDdatarq=[OrderID]] ChangingVarValue1=[URL][FormVariables name=ChangingVarValue1&exact=T][value][/FormVariables][/URL] [/replace] [/Founditems]================================ Kenneth Grome, WebDNA Consultant 808-737-6499, http://webdna.net ================================------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. Re: selectively replacing records within a [founditems] (PCS Technical Support 2000)
  2. Re: selectively replacing records within a [founditems] (Kenneth Grome 2000)
  3. Re: selectively replacing records within a [founditems] (John Butler 2000)
  4. Re: selectively replacing records within a [founditems] (Kenneth Grome 2000)
  5. selectively replacing records within a [founditems] (John Butler 2000)
>If I want to replace a record of a db within a [founditems] context which finds that >same record, and I have all the fieldname/value pairs in the [replace] context equal >to themselves (i.e. the values of the db fields are set to equal those found by the >search context), but I want to replace a few of the db field's values WITHOUT having >to use names for the formvariables which are NOT the same as the db fieldname, then >do you think using the following technique is reliable and recommended? - > >(extra carriage returns thrown in for readability) > >[founditems] >[replace db=Orders.db&eqOrderIDdatarq=[OrderID]] >StaticVar1=[StaticVar1] >&StaticVar2=[StaticVar2] >&StaticVar3=[StaticVar3] >&ChangingVarValue1=[url][FormVariables >name=ChangingVarValue1&exact=T][value][/FormVariables][/URL] >[/replace] >[/Founditems] > >Will that always ensure that I get the value that was passed from the form in for >ChangingVarValue1, rather than the value for ChangingVarValue1 that was already in >the db?Yes.But remember, if you're not changing StaticVar1 or StaticVar2 or StaticVar3, you don't need them in the replace context -- because webcat replaces only the fields named in the replace context, and it leaves the other fields as they are alone. So this is all the code you need:[founditems] [replace db=Orders.db&eqOrderIDdatarq=[OrderID]] ChangingVarValue1=[url][FormVariables name=ChangingVarValue1&exact=T][value][/FormVariables][/URL] [/replace] [/Founditems]================================ Kenneth Grome, WebDNA Consultant 808-737-6499, http://webdna.net ================================------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Kenneth Grome

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:

WebDelivery downloads alias, not original ? (1997) Answer: WebDelivery downloads alias, not original ? (1997) [WebDNA] (2010) how to add to triggers.db (1998) Summing fields (1997) Jimmy Houssen (1998) European Convention (2004) Set Cookie for Multiple Domain Extensions (2005) Using Applescript to process WebCatalog functions (1998) problems with 2 tags shakur (1997) WebCat2b15MacPlugin - [protect] (1997) Authenticate (1997) [QuantityPrice] Not working in WebCatNT 2.0.1??? (1997) Date problems (1997) Date calculation problems (1997) A little syntax help (1997) Sendmail problem on UNIX (2000) Problems with SELECT MULTIPLE (1999) Formating found categories (1997) Re:listfiles-looking for slick solution (1997)