Re: [Cart] ...
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 11890
interpreted = N
texte = >OK so I messed up when I first got started using WebCat2.0 and created a>database that doesn't use a [cart] to create a unique record ID.>>What happened is that somebody used the back button and then went foreward>using the html and created to identical records based on a name. If they>would have started at my add page entry point I have a checker there to>prevent this....but oh well it happened. When we tried to delete these>records both with the same name it hung webcat. So what I want to do is go>back this weekend and import the database into FilemakerPro and add a field>that in the future will be a [cart] number so this problem never occurs>again. This is all in a database not used for shopping.>>So can I just make the field where the [cart] value will go and just fill>each recored like 1,2,3,4,5,6 and so forth for these 225 some odd records>and then any new records will get the [cart] value? Anybody do this yet?>Seems like it should not be a problem. Just looking for somebody elses>experince who has done this.Yes you can do this and it will work fine. I did it myself a few timesbefore I finally learned that it's a LOT easier to ALWAYS put a 'sku' fieldinto every database as you create it. You can use [cart] to assign a uniquevalue to the sku field every time you $append a new record, and that skuvalue will always be unique not only to all the records in that databasebut to all the records in ALL your databases.Another useful tip I've learned is to make every field name unique acrossall your databases. This comes in very handy when you want to get aspecific value from a database that's one or two levels up in a nestedsearch situation.I've had problems trying to get the proper value from an enclosing searchcontext when using the same field names in different databases. I know thatsomeone is going to respond to this by saying You can use a [lookup] toget the field info from the proper database ...BUT ... lookup is always case sensitive, so unless you know that the valueparameter is EXACTLY what's in the lookInField, the lookup will fail.Keeping all your field names unique from the beginning is a useful way toextend the functionality of WebCat2 sometime later when you might just wishyou had used unique field names from the beginning ... :)
Associated Messages, from the most recent to the oldest:
|
- Re: [Cart] ... (ken@iav.com 1997)
|
>OK so I messed up when I first got started using WebCat2.0 and created a>database that doesn't use a
[cart] to create a unique record ID.>>What happened is that somebody used the back button and then went foreward>using the html and created to identical records based on a name. If they>would have started at my add page entry point I have a checker there to>prevent this....but oh well it happened. When we tried to delete these>records both with the same name it hung webcat. So what I want to do is go>back this weekend and import the database into FilemakerPro and add a field>that in the future will be a
[cart] number so this problem never occurs>again. This is all in a database not used for shopping.>>So can I just make the field where the
[cart] value will go and just fill>each recored like 1,2,3,4,5,6 and so forth for these 225 some odd records>and then any new records will get the
[cart] value? Anybody do this yet?>Seems like it should not be a problem. Just looking for somebody elses>experince who has done this.Yes you can do this and it will work fine. I did it myself a few timesbefore I finally learned that it's a LOT easier to ALWAYS put a 'sku' fieldinto every database as you create it. You can use
[cart] to assign a uniquevalue to the sku field every time you $append a new record, and that skuvalue will always be unique not only to all the records in that databasebut to all the records in ALL your databases.Another useful tip I've learned is to make every field name unique acrossall your databases. This comes in very handy when you want to get aspecific value from a database that's one or two levels up in a nestedsearch situation.I've had problems trying to get the proper value from an enclosing searchcontext when using the same field names in different databases. I know thatsomeone is going to respond to this by saying You can use a
[lookup] toget the field info from the proper database ...BUT ... lookup is always case sensitive, so unless you know that the valueparameter is EXACTLY what's in the lookInField, the lookup will fail.Keeping all your field names unique from the beginning is a useful way toextend the functionality of WebCat2 sometime later when you might just wishyou had used unique field names from the beginning ... :)
ken@iav.com
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:
Various Problems (1997)
find with exceptions (1997)
Initiating NewCart (1997)
Search bug. Help (2002)
random prob (2003)
PGP signed email on Unix/MacOSX (2000)
multi-paragraph fields (1997)
Express Lane (2000)
[WebDNA] Upper ASCII and charset [OT] (2016)
getchars broken? (1997)
Bulletin Board needed (2007)
Proper file locations (1997)
[shippingtotal] in Formulas.db (2002)
Authenticate (1997)
THANKS (1997)
Another bug to squash (WebCat2b13 Mac .acgi) (1997)
encryption in browser? (1998)
unable to launch acgi in WebCat (1997)
Multiple cart additions (1997)
Secure Server (1997)