That worked now.
THanks
On Tue, 19 Nov 2002 11:40:35 -0500, Cornillon, Matthieu wrote:
> Hi, Flashguy. Would you post the exact cfif statement (non-nested version)
> you are using that is causing a problem and let us know what error it's
> showing?
>
> You could also use this:
>
> <cfif isdefined("qgetdir.strOmit") AND
> FindNoCase("documents",qgetdir.strOmit)>
>
> The documents string should be wrapped in double-quotes (as above), and the
> FindNoCase function will get over the problem of case-sensitivity. Also,
> you can drop the "GT 0", as 0 will evaluate to false and any other number
> will evaluate to true.
>
> Hope this is useful.
>
> Matthieu
>
>
>
> -----Original Message-----
> From: FlashGuy [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 19, 2002 11:24 AM
> To: CF-Talk
> Subject: Re: IsDefined do this...
>
>
> I tried the below but it won't work?
>
> Only the nested <cfif does?
>
> On Tue, 19 Nov 2002 16:23:06 -0000, Stephen Moretti wrote:
>
> > No....
> >
> > You can do it in one CFIF. No need to nest....
> >
> > <cfif isdefined("qgetdir.strOmit") AND
> ListFind(qgetdir.strOmit,'documents')
> > GT 0>
> >
> > If CFIF fails on one part of the condition it doesn't evaluate the rest of
> > the condition (unlike IIF() which evaluates all conditions and responses).
> >
> > You should use ListFind instead of CONTAINS, as CONTAINS won't always
> return
> > the result you expect if there is more than one occurance of 'documents'
> in
> > the strOmit list.
> >
> > Regards
> >
> > Stephen
> >
> >
> >
> > ----- Original Message -----
> > From: "John Beynon" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Tuesday, November 19, 2002 4:02 PM
> > Subject: RE: IsDefined do this...
> >
> >
> > > Would that not be a nested CFIF block?
> > >
> > > <cfif isdefined("qgetdir.strOmit")>
> > > <cfif qgetdir.strOmit CONTAINS 'documents'>
> > > ...
> > > <cfelse>
> > > ...
> > > </cfif>
> > > </cfif>
> > >
> > > jb.
> > >
> > > -----Original Message-----
> > > From: FlashGuy [mailto:[EMAIL PROTECTED]]
> > > Sent: 19 November 2002 15:54
> > > To: CF-Talk
> > > Subject: IsDefined do this...
> > >
> > > Hi,
> > >
> > > I'm checking a field in my database and if its equal to something do
> > > this...otherwise...do else...
> > >
> > > Here is my code:
> > >
> > > <cfif isDefined("qgetdir.strOmit") and Len(Trim(qgetdir.strOmit)) GT 0>
> > > ..do this...
> > > <cfelse>
> > > ..do this...
> > > </cfif>
> > >
> > > The above field contains multiple directories. I need to check if
> > > "documents" exists in the field qgetdir.strOmit
> > >
> > > This is what I have but it doesn't work.
> > >
> > > <cfif isDefined("qgetdir.strOmit") CONTAINS 'documents'>
> > >
> >
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com