Re: SKU lookup
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13102
interpreted = N
texte = >>>How would one write an expression to lookup the last SKU entry made>>>in a given db, and then add 1 to it, and enter that automatically in the>>>SKU field?>> What record do you want this new SKU value to go into?>> Do you want it to go into a brand new record, or do you want to>> replace the existing SKU value in the last record of the database?>It is for adding new records, I don't want to have to sift through the>entire db to find a unique SKU, so i thought that this would be a good>way to do it.  Is there a better way?Yes, and it's really easy, because WebCat has a way to generateunique sku values automatically - it's called the [cart] tag.Every time you create a new record, you can make WebCatalog create aunique sku value for that record simply by putting sku=[cart] intothe form or hyperlink or context that creates the new record. Hereare three simple examples to help get you started ...Hyperlink example:
appenda new recordForm example:
Context example:[append db=somedatabase.db]sku=[cart][/append]Sincerely, Ken GromeWebDNA Solutionshttp://www.hui.net/dna/webdna.html
Associated Messages, from the most recent to the oldest:
>>>How would one write an expression to lookup the last SKU entry made>>>in a given db, and then add 1 to it, and enter that automatically in the>>>SKU field?>> What record do you want this new SKU value to go into?>> Do you want it to go into a brand new record, or do you want to>> replace the existing SKU value in the last record of the database?>It is for adding new records, I don't want to have to sift through the>entire db to find a unique SKU, so i thought that this would be a good>way to do it.  Is there a better way?Yes, and it's really easy, because WebCat has a way to generateunique sku values automatically - it's called the 
[cart] tag.Every time you create a new record, you can make WebCatalog create aunique sku value for that record simply by putting sku=
[cart] intothe form or hyperlink or context that creates the new record. Hereare three simple examples to help get you started ...Hyperlink example:
appenda new recordForm example:
Context example:[append db=somedatabase.db]sku=
[cart][/append]Sincerely, Ken GromeWebDNA Solutionshttp://www.hui.net/dna/webdna.html
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:
 
Database Fields (1997)
 
Is there an easier way? (1998)
 
when is date system date or order date? (1997)
 
[WebDNA] Gulf Coast WebDNA programmers (2010)
 
WebCatalog/WebMerchant Manuals Available (1998)
 
searches with dash, period etc. (2000)
 
 Grep (2003)
 
2.0 Info (1997)
 
SMITH MICRO:  FW: Emailer stops on Win 2000 (2002)
 
Web Catalog vs. ICAT (1997)
 
[browsername] not working? (1997)
 
Search in 2 or more catalogs (1997)
 
RE: NewCart+Search with one click ? (1997)
 
WebCatalog NT beta 18 problem (1997)
 
Counting records (2000)
 
PIXO support (1997)
 
Missing from Docs [folderName] (1997)
 
 OT-ssh help (2004)
 
Here's how to kill a Butler Database. (1997)
 
 ISAPI WC6a and Windows 2003 Web Edition (2006)