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 notworking. When you use [replace], you have to write some *searchparameters* into the [replace] tag so WebCat knows which record youwant 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 alreadyexist in the database, all you care about is adding a new one to theend of the file.Also, don't start your first replace parameter with &, because it'snot needed for the first parameter inside the replace context ... andyou forgot the brackets around your zipcode variable ... :)Your code:[replacedb=mcust.db&append=T]&firstname=[firstname]&lastname=[lastname]&company=[company]&building=[building]&suite=suite&zipcode=[zipcode]&areacode=[areacode]&phone=[phone]&faxareacode=[faxareacode]&emailname=[emailname]&specdel=[specdel]&custcode=[math]newnum[/math][/replace]My code:[replaceappend=T&db=mcust.db&eqSomeFieldData=XXX]firstname=[firstname]&lastname=[lastname]&company=[company]&building=[building]&suite=[suite]&zipcode=[zipcode]&areacode=[areacode]&phone=[phone]&faxareacode=[faxareacode]&emailname=[emailname]&specdel=[specdel]&custcode=[math]newnum[/math][/replace]Sincerely,Ken Gromeken@iav.com808-737-6499WebDNA Solutionshttp://www.hui.net/
Associated Messages, from the most recent to the oldest:
>>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 notworking. When you use
[replace], you have to write some *searchparameters* into the
[replace] tag so WebCat knows which record youwant 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 alreadyexist in the database, all you care about is adding a new one to theend of the file.Also, don't start your first replace parameter with &, because it'snot needed for the first parameter inside the replace context ... andyou forgot the brackets around your zipcode variable ... :)Your code:[replacedb=mcust.db&append=T]&firstname=[firstname]&lastname=[lastname]&company=[company]&building=[building]&suite=suite&zipcode=[zipcode]&areacode=[areacode]&phone=[phone]&faxareacode=[faxareacode]&emailname=[emailname]&specdel=[specdel]&custcode=
[math]newnum[/math][/replace]My code:[replaceappend=T&db=mcust.db&eqSomeFieldData=XXX]firstname=[firstname]&lastname=[lastname]&company=[company]&building=[building]&suite=[suite]&zipcode=[zipcode]&areacode=[areacode]&phone=[phone]&faxareacode=[faxareacode]&emailname=[emailname]&specdel=[specdel]&custcode=
[math]newnum[/math][/replace]Sincerely,Ken Gromeken@iav.com808-737-6499WebDNA Solutionshttp://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:
[WebDNA] java and webnda (2017)
search form problem.. (1997)
[WebDNA] Help with STMP Setup using Authentication with Google (2016)
Trigger Error (2001)
emailer (1997)
[WebDNA] Date error (2017)
Not really WebCat- (1997)
Max Record length (1997)
SiteGuard Admin Feature ? (1997)
Simple way to create unique SKU (1997)
WC2.0 Memory Requirements (1997)
Reversed words (1997)
WC2b15 File Corruption (1997)
Monthly Reports (2000)
Understanding texta (1997)
Has anyone accessed an LDAP server via Typhoon Pro? (2000)
[date] tag not working on mac 4.0.1 (2000)
[TaxableTotal] - not working with AOL and IE (1997)
(2000)
no global [username] or [password] displayed ... (1997)