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 generate unique sku values automatically - it's called the [cart] tag.Every time you create a new record, you can make WebCatalog create a unique sku value for that record simply by putting sku=[cart] into the form or hyperlink or context that creates the new record. Here are three simple examples to help get you started ... Hyperlink example:append a new record Form example:
Context example:[append db=somedatabase.db]sku=[cart][/append]Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html Associated Messages, from the most recent to the oldest:

    
  1. Re: SKU lookup (Damien Joldersma 1997)
  2. Re: SKU lookup (Kenneth Grome 1997)
  3. Re: SKU lookup (Olin 1997)
  4. Re: SKU lookup (Kenneth Grome 1997)
  5. Re: SKU lookup (Daniel Cameron 1997)
  6. Re: SKU lookup (Damien Joldersma 1997)
  7. Re: SKU lookup (Kenneth Grome 1997)
  8. SKU lookup (Damien Joldersma 1997)
>>>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 generate unique sku values automatically - it's called the [cart] tag.Every time you create a new record, you can make WebCatalog create a unique sku value for that record simply by putting sku=[cart] into the form or hyperlink or context that creates the new record. Here are three simple examples to help get you started ... Hyperlink example:append a new record Form example:
[cart]>
Context example:[append db=somedatabase.db]sku=[cart][/append]Sincerely, Ken Grome WebDNA Solutions http://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)