Re: IIF doesn't work correctly
I correct myself, the example works, but what I'm trying to do doesn't work. Can anyone look at this and see why it isn't working #iif(listlen(cgi.query_string, "&") gt 1, Evaluate(DE("listdeleteat(listdeleteat(cgi.query_string, 1, "&"), 1, "=")")), DE("test"))# The cgi query_string will have either fuseaction=login.login or fuseaction=login.login&fa=something.else , that way if I am passing the extra fa I want them to be redirected to that fa after login. Bob > I was having some issues on IIF and thought I was using it correctly > so I reverified it by looking at the examples in the book and if I > copy an example directly out of the docs, it doesn't work. Try this in > CFMX 6.1 #IIf(IsDefined("Form.Deliver"), Evaluate(DE("Form.Deliver")), > DE("no"))# > > That should output no and not throw an error, but on my box it does. > Anyone know a workaround. The livedocs can be viewed here. > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct117.htm > > > bob Everland [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: IIF doesn't work correctly
> I was having some issues on IIF and thought I was using it > correctly so I reverified it by looking at the examples in > the book and if I copy an example directly out of the docs, > it doesn't work. Try this in CFMX 6.1 > #IIf(IsDefined("Form.Deliver"), Evaluate(DE("Form.Deliver")), > DE("no"))# > > That should output no and not throw an error, but on my box > it does. Anyone know a workaround. The livedocs can be viewed > here. > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct117.htm I haven't actually tried running your code, but why would you nest DE within Evaluate? You should be able to simplify the _expression_: #IIf(IsDefined("Form.Deliver"), "Form.Deliver", DE("no"))> Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: IIF doesn't work correctly
It's a bit overcomplicated (evaluate and de cancel each other AFAIK), but your problem is with quotes Evaluate(DE("listdeleteat(listdeleteat(cgi.query_string, 1, '&'), 1, '=')")) Pascal > -Original Message- > From: Robert Everland III [mailto:[EMAIL PROTECTED] > Sent: vrijdag 19 maart 2004 15:45 > To: CF-Talk > Subject: Re: IIF doesn't work correctly > > I correct myself, the example works, but what I'm trying to > do doesn't work. Can anyone look at this and see why it isn't working > > #iif(listlen(cgi.query_string, "&") gt 1, > Evaluate(DE("listdeleteat(listdeleteat(cgi.query_string, 1, > "&"), 1, "=")")), DE("test"))# > > The cgi query_string will have either fuseaction=login.login > or fuseaction=login.login&fa=something.else , that way if I > am passing the extra fa I want them to be redirected to that > fa after login. > > > Bob > > > > > I was having some issues on IIF and thought I was using it > correctly > > so I reverified it by looking at the examples in the book and if I > > copy an example directly out of the docs, it doesn't work. > Try this in > > CFMX 6.1 #IIf(IsDefined("Form.Deliver"), > Evaluate(DE("Form.Deliver")), > > DE("no"))# > > > > That should output no and not throw an error, but on my box > it does. > > Anyone know a workaround. The livedocs can be viewed here. > > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct117.htm > > > > > > bob > Everland > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: IIF doesn't work correctly
I figured it out, must not put double quotes. Bob > I correct myself, the example works, but what I'm trying to do doesn't > work. Can anyone look at this and see why it isn't working > > #iif(listlen(cgi.query_string, "&") gt 1, > Evaluate(DE("listdeleteat(listdeleteat(cgi.query_string, 1, "&"), 1, > "=")")), DE("test"))# > > The cgi query_string will have either fuseaction=login.login or > fuseaction=login.login&fa=something.else , that way if I am passing > the extra fa I want them to be redirected to that fa after login. > > > Bob > > > > > I was having some issues on IIF and thought I was using it correctly > > > so I reverified it by looking at the examples in the book and if I > > copy an example directly out of the docs, it doesn't work. Try this > in > > CFMX 6.1 #IIf(IsDefined("Form.Deliver"), Evaluate(DE("Form. > Deliver")), > > DE("no"))# > > > > That should output no and not throw an error, but on my box it does. > > > Anyone know a workaround. The livedocs can be viewed here. > > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funct117.htm > > > > > > bob Everland [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]