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:
Separate SSL Server (1997)
Locking up with WebCatalog... (1997)
Integration with SQL (1997)
template cache problem (1998)
StoreBuilder (retitled) (2002)
[date] tag not working on mac 4.0.1 (2000)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
this year (2000)
multi-paragraph fields (1997)
WC2.0 Memory Requirements (1997)
Math, Multiple Equasions and Show/Hide (1998)
[OT] - simple JS question (2004)
file uploads with webcat...binary? (1998)
[WebDNA] Cicada - WebDNA_CICADA_6.1.b02 - gratz and request...! (2009)
Server Load (2000)
emailer (1997)
success - serial numbers and webmerch (1997)
More than one db with the same namn (was: WC2f3) (1997)
File Upload (1997)
Other then credit cards-how? (1997)