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:

Searching multiple fields from one form field (1997) Performance Settings (2000) WebCatalog Hosting (1996) Setting user and password (1999) Re:No Data (1997) Webcatalog 4.0 - When will we be able to beta test it? (2000) WebCatalog Hosting (1996) Formating found categories (1997) & in Lookups (1997) Not really WebCat (1997) WebCat Sites Hanging (!) (2003) [SHOWNEXT] Examples (1997) PCS Frames (1997) [WriteFile] problems (1997) Version 4? (2000) Searching multiple Databases (1997) WC2.0 Memory Requirements (1997) ftp to webstar (2001) Help name our technology! (1997) real beginner stumped (2000)