Re: Prevent multiple appends with Reload Button

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 15509
interpreted = N
texte = >>Instead of doing an [append] you can use [replace] but include the tag >>append=T (i.e. [replace append=T&...]). This will append if it's not >>found, but just replace the data with itself if they reload the page. > >Please show me how - my attempts haven't worked >I would like a new entry only if the customer and new customer code >hasn't been added already. Your code doesn't search for a particular record, that's why it's not working. When you use [replace], you have to write some *search parameters* into the [replace] tag so WebCat knows which record you want to replace. Just specifying a database is not enough.You may be getting mixed up with [append], but append is different, because when you're appending, you don't care what records already exist in the database, all you care about is adding a new one to the end of the file.Also, don't start your first replace parameter with &, because it's not needed for the first parameter inside the replace context ... and you forgot the brackets around your zipcode variable ... :)Your code:[replace db=mcust.db&append=T]&firstname=[firstname]&lastname=[lastname]&company=[company ]&building=[building]&suite=suite&zipcode=[zipcode]&areacode=[areacode]&phone=[p hone]&faxareacode=[faxareacode]&emailname=[emailname]&specdel=[specdel]&custcode =[math]newnum[/math][/replace] My code:[replace append=T&db=mcust.db&eqSomeFieldData=XXX]firstname=[firstname]&lastname=[lastnam e]&company=[company]&building=[building]&suite=[suite]&zipcode=[zipcode]&areacod e=[areacode]&phone=[phone]&faxareacode=[faxareacode]&emailname=[emailname]&specd el=[specdel]&custcode=[math]newnum[/math][/replace]Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://www.hui.net/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Prevent multiple appends with Reload Button (Kenneth Grome 1997)
  2. Re: Prevent multiple appends with Reload Button (Larry Orchier 1997)
  3. Re: Prevent multiple appends with Reload Button (Larry Orchier 1997)
  4. Re: Prevent multiple appends with Reload Button (John Hill 1997)
  5. Re: Prevent multiple appends with Reload Button (John Hill 1997)
  6. Prevent multiple appends with Reload Button (Larry Orchier 1997)
>>Instead of doing an [append] you can use [replace] but include the tag >>append=T (i.e. [replace append=T&...]). This will append if it's not >>found, but just replace the data with itself if they reload the page. > >Please show me how - my attempts haven't worked >I would like a new entry only if the customer and new customer code >hasn't been added already. Your code doesn't search for a particular record, that's why it's not working. When you use [replace], you have to write some *search parameters* into the [replace] tag so WebCat knows which record you want to replace. Just specifying a database is not enough.You may be getting mixed up with [append], but append is different, because when you're appending, you don't care what records already exist in the database, all you care about is adding a new one to the end of the file.Also, don't start your first replace parameter with &, because it's not needed for the first parameter inside the replace context ... and you forgot the brackets around your zipcode variable ... :)Your code:[replace db=mcust.db&append=T]&firstname=[firstname]&lastname=[lastname]&company=[company ]&building=[building]&suite=suite&zipcode=[zipcode]&areacode=[areacode]&phone=[p hone]&faxareacode=[faxareacode]&emailname=[emailname]&specdel=[specdel]&custcode =[math]newnum[/math][/replace] My code:[replace append=T&db=mcust.db&eqSomeFieldData=XXX]firstname=[firstname]&lastname=[lastnam e]&company=[company]&building=[building]&suite=[suite]&zipcode=[zipcode]&areacod e=[areacode]&phone=[phone]&faxareacode=[faxareacode]&emailname=[emailname]&specd el=[specdel]&custcode=[math]newnum[/math][/replace]Sincerely, Ken Grome ken@iav.com 808-737-6499 WebDNA Solutions http://www.hui.net/ 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:

Attn: Bug in GeneralStore example b15 (1997) [accountNum] and [math] (1997) Emailer (WebCat2) (1997) WebDelivery downloads alias, not original ? (1997) Now you see it now you donīt (1997) THANKS!!! ShipCosts.db and debugging (1997) [purgeDatabase], [replaceChars] and others ... (1997) Netscape 3.01 can't see db in form (was problems problemsproblems) (1997) [date] insanity! (2001) why is this line in GeneralStore? (1998) sort by day of week... (2003) URGENT! ACGI Stopped!!!! (1997) WC Database Format (1997) Only charge card when product shipped ? (1997) Purchase command error problem (1997) Anyone have an invoicing system? (1999) WebCommerce: Folder organization ? (1997) Download URL & access on the fly ? (1997) Associative lookup style? (1997) Registration Form (1998)