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:
Summing fields (1997)
Hiding URL ? (1998)
WebDNA Windows 5.0 sendmail bug (2003)
Friday night shopping site joke (1997)
Limiting user access to .tmpl files (1997)
limitation found on group searching (1997)
WebCat2b13MacPlugIn - more [date] problems (1997)
Squares instead of spaces (2001)
turning every 5th line red (1999)
Showif, Hideif reverse logic ? (1997)
Webcatalog [blank] Problem (1999)
SUBMIT buttons not working.... (2000)
Sort Order on a page search (1997)
New command suggestion (was Modifying databases manually) (1997)
Carts & cookies (1999)
IIS4 & Password Authentication, request example (1998)
[OT] WebDNA Training (UK) (2003)
Multiple fields on 1 input (1997)
RE: Re:Signal Raised (1997)
[WebDNA] eCommerce in 7.0 but not in 7.1? (2012)