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:

Emailer again & again (1997) WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997) AutoCommit Preference? (1998) [WebDNA] anyway to speed up tcpconnect? (2008) Double Spacing in Mails from Sendmail (2002) Question about replacing words (1998) Wanted: Content Management System (2005) Summing fields (1997) Requiring that certain fields be completed (1997) Error:Too many nested [xxx] contexts (1997) Sendmail (2000) completed orders database (1997) Email within tmpl ? (1997) French characters in variables (2001) plus sign giving me problems in convertchars (2005) WebSTAR 2.1 freezes my Mac (1997) shipcost (1997) Email encryption (1998) save & character in db (2005) Q: old cart serial problem (2000)