Re: searching with if/then
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 58038
interpreted = N
texte = DonovanYou asked if some of the ShowIf variables should be URLedI have found that if you are doing something like[ShowIf [MyVariable]!]If MyVariable = hello! then the variable is Not Empty, however WebDNA will see the ! in the variable and get confused and invariably give you the wrong outcome - now if you do this[ShowIf [URL][MyVariable][/URL]!]WebDNA will URL the ! and not get confused giving you the correct and expected outcome.Give it a go on a test page and you will see the difference.On 26 May 2004, at 01:53 AM, Donovan Brooke wrote:> Jon Young wrote:>> Hello all,>> First post ever!>> Anybody know why the heck this isn't working... I can explain more if >> needed:> [snip]>> Jon, welcome to the group. The problem I have with new posters posting> complex search perams is first, that there are many problems and it > takes time> to point everything out. Second, I don't know of all the vast > possible values> that could be going into the context so it is just about hopeless to > trouble> shoot. I am not sure how to suggest a better post... maybe taking out > non-issue> perams such as sort etc... maybe including value examples above the > search..> such as:>> Value examples:> [fontsrch] = "san-serif"> [fontfam] = "helvetica"> [keyword] = "puff daddy"> etc..>>> However, here is some comments towards the revised (stuarts) code:>> Lots of questions:>> [search db=../../www.philsfonts.com/vault/philsfonts.db[!]> [/!][showif [URL][keyword][/URL]!][!]> [/!]&[wrd]GROUP1datarq=[keyword][!]> > > > [/!]&GROUP1FIELD=[!]> > [/!][If(("[fontsrch]"="T")&("[famsrch]"="T"))][Then]nohtml+fontname+fou > n dry+fampkg+[/Then][/If][!]> > [/!][If(("[fontsrch]"="T")&("[famsrch]"="F"))][Then]nohtml+fontname+fou > n dry+fampkg+[/Then][/If][!]> > [/!][If(("[fontsrch]"="F")&("[famsrch]"="T"))][Then]&eqFAMDISPdatarq=T[ > / Then][/If][!]> > > > [/!][If(("[fontsrch]"="F")&("[famsrch]"="F"))][Then][math > show=F]err=0,err_num=0[/math][/Then][/If][!]> > > > [/!][showif [URL][foundrystring][/ URL]!][!]> [!]&woFOUNDRYdatarq=[foundrystring][!]> > > > [/!]&FOUNDRYword=sw&FOUNDRYwbrk=,[!]> [/!][/ showif][!]> [/!][showif [URL][designer][/URL]!][!]> [/!]&eqDESIGNERdatarq=[designer][!]> > > > [/!][/showif][!]> [/!][showif [URL][classstring][/ URL]!][!]> [/!]&woCLASSIFICATIONdatarq=[classstring][!]> > > > [/!]&CLASSIFICATIONword=sw[!]> [/!]&CLASSI FICATIONwbrk=,[!]> [!][/showif][!]> [/!]&MANOPTsort=1[!]> [/!]&MANOPTtype=text[!]> [/!]&MANOPTsdir=de[!]> [/!]&FONTNAMEsort=2[!]> [/!]&FONTNAMEt ype=text[!]> > > > [/!]&FONTNAMEsdir=as[!]> [/!]&VOLPKGNUMsort=3[!]> [/!]&FONTNAMEsumm=T[!]> [/!]&startat=[startat ][!]> > > > [/!]&max=[rslts]]> > > > [/showif]> > > [/search]>> Cheers,> Donovan>>> -- > =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o> DONOVAN D. BROOKE Eucalyptus Design> <-Web Development (specializing in eCommerce), ->> <-Graphic Design, and Pre-Press Consultation ->>> ADDRESS:> Donovan Brooke> DBA Eucalyptus Design> N2862 Summerville Park Rd.> Lodi, WI 53555> PH:> 1.608.592.3567> Web:> http://www.euca.us> =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>>RegardsStuart Tremainidfk web developments114a/40 yeo street neutral bay 2089 australiat +612 9908 2134f +612 9908 4837-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
DonovanYou asked if some of the ShowIf variables should be URLedI have found that if you are doing something like[ShowIf [MyVariable]!]If MyVariable = hello! then the variable is Not Empty, however WebDNA will see the ! in the variable and get confused and invariably give you the wrong outcome - now if you do this[ShowIf [url][MyVariable][/URL]!]WebDNA will URL the ! and not get confused giving you the correct and expected outcome.Give it a go on a test page and you will see the difference.On 26 May 2004, at 01:53 AM, Donovan Brooke wrote:> Jon Young wrote:>> Hello all,>> First post ever!>> Anybody know why the heck this isn't working... I can explain more if >> needed:> [snip]>> Jon, welcome to the group. The problem I have with new posters posting> complex search perams is first, that there are many problems and it > takes time> to point everything out. Second, I don't know of all the vast > possible values> that could be going into the context so it is just about hopeless to > trouble> shoot. I am not sure how to suggest a better post... maybe taking out > non-issue> perams such as sort etc... maybe including value examples above the > search..> such as:>> Value examples:> [fontsrch] = "san-serif"> [fontfam] = "helvetica"> [keyword] = "puff daddy"> etc..>>> However, here is some comments towards the revised (stuarts) code:>> Lots of questions:>> [search db=../../www.philsfonts.com/vault/philsfonts.db[!]> [/!][showif [url][keyword][/URL]!][!]> [/!]&[wrd]GROUP1datarq=[keyword][!]> > > > [/!]&GROUP1FIELD=[!]> > [/!][If(("[fontsrch]"="T")&("[famsrch]"="T"))][Then]nohtml+fontname+fou > n dry+fampkg+[/Then][/If][!]> > [/!][If(("[fontsrch]"="T")&("[famsrch]"="F"))][Then]nohtml+fontname+fou > n dry+fampkg+[/Then][/If][!]> > [/!][If(("[fontsrch]"="F")&("[famsrch]"="T"))][Then]&eqFAMDISPdatarq=T[ > / Then][/If][!]> > > > [/!][If(("[fontsrch]"="F")&("[famsrch]"="F"))][Then][math > show=F]err=0,err_num=0[/math][/Then][/If][!]> > > > [/!][showif [url][foundrystring][/ URL]!][!]> [!]&woFOUNDRYdatarq=[foundrystring][!]> > > > [/!]&FOUNDRYword=sw&FOUNDRYwbrk=,[!]> [/!][/ showif][!]> [/!][showif [url][designer][/URL]!][!]> [/!]&eqDESIGNERdatarq=[designer][!]> > > > [/!][/showif][!]> [/!][showif [url][classstring][/ URL]!][!]> [/!]&woCLASSIFICATIONdatarq=[classstring][!]> > > > [/!]&CLASSIFICATIONword=sw[!]> [/!]&CLASSI FICATIONwbrk=,[!]> [!][/showif][!]> [/!]&MANOPTsort=1[!]> [/!]&MANOPTtype=text[!]> [/!]&MANOPTsdir=de[!]> [/!]&FONTNAMEsort=2[!]> [/!]&FONTNAMEt ype=text[!]> > > > [/!]&FONTNAMEsdir=as[!]> [/!]&VOLPKGNUMsort=3[!]> [/!]&FONTNAMEsumm=T[!]> [/!]&startat=[startat ][!]> > > > [/!]&max=[rslts]]> > > > [/showif]> > > [/search]>> Cheers,> Donovan>>> -- > =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o> DONOVAN D. BROOKE Eucalyptus Design> <-Web Development (specializing in eCommerce), ->> <-Graphic Design, and Pre-Press Consultation ->>> ADDRESS:> Donovan Brooke> DBA Eucalyptus Design> N2862 Summerville Park Rd.> Lodi, WI 53555> PH:> 1.608.592.3567> Web:> http://www.euca.us> =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o>> -------------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/>>RegardsStuart Tremainidfk web developments114a/40 yeo street neutral bay 2089 australiat +612 9908 2134f +612 9908 4837-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Stuart Tremain
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:
Test (2003)
Problem displaying search result (1997)
Prices Dropped (1998)
Snake Bites (1997)
Security (1998)
Credit card arrangement (2005)
Great product and great job ! (1997)
Cart questions (1997)
Migrating to NT (1997)
price change help (1998)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
still having shipCost.db Problem (1997)
WebCat2 - Getting to the browser's username/password data (1997)
Errata: WCS Newbie question (1997)
Re:2nd WebCatalog2 Feature Request (1996)
RE: new cart IDs being assigned somehow (1997)
WebCat2b13MacPlugIn - More limits on [include] (1997)
Bug? (1997)
WebTen and WebCat (1997)
[Announce]: Web server security and password protection (1997)