Re: [LookUp]
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23641
interpreted = N
texte = >I am doing a simple [lookup], but since [UpAllNight]=T I am making what>is probably a stupid mistake. Can anyone see it??>>[HideIf [action]=Register]>
>[/HideIf]>[ShowIf [action]=Register]>[!]Checks to make sure both passwords are the same[/!]>[ShowIf [__Pass]![__PassC]]You have entered 2 different passwords - Try>again loser[/ShowIf]>[ShowIf [__Pass]=[__PassC]]>>[!]Part of login.tpl[/!]>[!]This is the line of code giving me probs[/!]>>[ShowIf [Lookup>db=Users.db&Value=[__Name]&LookInField=NAME&ReturnField=NAME&NotFound=T]=T]>Your OK[/ShowIf]>>[/ShowIf]>[/ShowIf]It doesn't work because of two things:1-Lookups are CASE-SENSITIVE but you're not forcing the [__Name] value to be UPPERCASE in the lookup ... and even if you did, all the [__Name] values in the db would have to be UPPERCASE to begin with.I have found that it's easiest to force the original entry of these values to be all UPPERCASE characters when appended or replaced in the db, then in the lookup you can wrap the value in an [uppercase] context to make webcat give you the results you seek.2- The NotFound=T parameter should be NotFound=F to prevent the showif from executing when the record doesn't exist.Sincerely,Ken GromeWebDNA Consultant
Associated Messages, from the most recent to the oldest:
>I am doing a simple
[lookup], but since [UpAllNight]=T I am making what>is probably a stupid mistake. Can anyone see it??>>[HideIf [action]=Register]>
>[/HideIf]>[ShowIf [action]=Register]>
[!]Checks to make sure both passwords are the same[/!]>[ShowIf [__Pass]![__PassC]]You have entered 2 different passwords - Try>again loser[/ShowIf]>[ShowIf [__Pass]=[__PassC]]>>
[!]Part of login.tpl[/!]>
[!]This is the line of code giving me probs[/!]>>[ShowIf [Lookup>db=Users.db&Value=[__Name]&LookInField=NAME&ReturnField=NAME&NotFound=T]=T]>Your OK[/ShowIf]>>[/ShowIf]>[/ShowIf]It doesn't work because of two things:1-Lookups are CASE-SENSITIVE but you're not forcing the [__Name] value to be UPPERCASE in the lookup ... and even if you did, all the [__Name] values in the db would have to be UPPERCASE to begin with.I have found that it's easiest to force the original entry of these values to be all UPPERCASE characters when appended or replaced in the db, then in the lookup you can wrap the value in an
[uppercase] context to make webcat give you the results you seek.2- The NotFound=T parameter should be NotFound=F to prevent the showif from executing when the record doesn't exist.Sincerely,Ken GromeWebDNA Consultant
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:
[append] and SSL (1997)
different show next (1997)
Quit revisited (1997)
Displaying photo attached to first record (1997)
Looking for WebCatalog Linux experience/comments. (2001)
WCS Newbie question (1997)
WriteFile and returns... (2000)
WebCat & WebTen (1997)
(1997)
WebCat2b15MacPlugin - [protect] (1997)
RE: Checkboxes to add to cart... (1998)
Generating unique SKU from [cart] - Still Stumped... (1997)
email address scrambling (2002)
[WebDNA] Record click-thrus (2008)
Another XML Questgion (2000)
form data submission gets truncated (1997)
listcookies works only sometimes (1997)
RE: Displaying Location (1997)
EIMS Problems (1997)
html pages not working (2003)