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:

emailer (1997) The Archives? (1999) PCS Frames (1997) Timer Values on [redirect] (1998) emailer settings and control questions (1997) Shipping [grandtotal] solution (1997) [format 40s]text[/format] doesn't work (1997) WCS Newbie question (1997) PROTECT PAGES (2002) [WebDNA] Rewrite url (2013) founditems and setheader (2000) WebCatalog can't find database (1997) converting characters in form (1997) Bad Cookie / Internet Option / Internet Explorer (2004) [include ...] behavior (1997) Re2: frames & carts (1997) Try not to laugh (2007) default value from Lookup (was Grant, please help me) (1997) Explorer 3.0/ Access Denied! (1997) Summing fields (1997)