Re: Lookup command

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19716
interpreted = N
texte = >I am putting the following command into a template: > >[lookup >db=local.db&value=[SKU]&lookinfield=SKU&returnfield=LastName¬Found=null] > >This expression works fine when there is something in the LastName field. >It returns that value. >When the LastName field is empty I expect to get the asnswer null from >notFound but I get no answer. It acts as if it had not encountered the >command. > >I know this should be simple, but it is me that feels that way at the >moment. What explains not getting an answer. Shouldn't I get whatever >text is set in the notFound??No, you should get the notFound text only when the record you're seeking is not found.WebCat is not having any troubel finding that record, it is actually finding the [SKU] value in the SKU field of your database record, then it is returning the value of the LastName field from that record. It just so happens that the value of the LastName field in that record is blank, so that's what it being displayed -- a blank.It will only display the word null if it cannot find the [SKU] value in one of the db records ... or perhaps if there's no LastName field in that database ...Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: lookup command (Jan Kinzler 1999)
  2. Re: lookup command (Dave MacLeay 1999)
  3. lookup command (Jan Kinzler 1999)
  4. Re: Lookup command (Kenneth Grome 1998)
  5. Lookup command (RH Prouty 1998)
  6. Re: Lookup command (Bob Minor 1998)
  7. Re: lookup command (Kenneth Grome 1997)
  8. shipping calculations, lookup command (Sandra L. Pitner <76501.3521@CompuServe.COM> 1997)
>I am putting the following command into a template: > >[lookup >db=local.db&value=[SKU]&lookinfield=SKU&returnfield=LastName¬Found=null] > >This expression works fine when there is something in the LastName field. >It returns that value. >When the LastName field is empty I expect to get the asnswer null from >notFound but I get no answer. It acts as if it had not encountered the >command. > >I know this should be simple, but it is me that feels that way at the >moment. What explains not getting an answer. Shouldn't I get whatever >text is set in the notFound??No, you should get the notFound text only when the record you're seeking is not found.WebCat is not having any troubel finding that record, it is actually finding the [SKU] value in the SKU field of your database record, then it is returning the value of the LastName field from that record. It just so happens that the value of the LastName field in that record is blank, so that's what it being displayed -- a blank.It will only display the word null if it cannot find the [SKU] value in one of the db records ... or perhaps if there's no LastName field in that database ...Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net 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:

Nested tags count question (1997) Formating found categories (1997) Add to Cart & List of Products (1997) Database Advice (1996) More questions about serial number dishing (1997) ErrorMessages.db suggestion (1997) SiteEdit NewFile.html ? (1997) update on wn searching (1997) Multiple prices (1997) Catalog Design (1999) Progress !! WAS: Trouble with formula.db (1997) Exclamation point (1997) how to check for no value while using [URL] to prevent cr (1999) Latin Characters (1998) Part 2 - [showif] if variable exists (1998) To Err or Not Custom Error (1999) UPS (2003) mass mailing (1998) [raw] & typhoon pro 3.0 or 4.0 (2001) PCS Frames (1997)