Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coldfusion 8: IsDefined('URL.variable') and is not ""?

I'm trying to find out if a url variable exists, and if it doesn't, make sure that it's not empty.

This does not work:

<cfif IsDefined('URL.affiliateId') and is not "">
    //
</cfif>
like image 659
dcolumbus Avatar asked Nov 09 '10 17:11

dcolumbus


People also ask

What is IsDefined in ColdFusion?

IsDefined()Evaluates a string value to determine whether the variable named in it exists. Status: deprecated. IsDefined( value=string ); Returns: Boolean. Argument.

What is IsDefined?

Evaluates a string value to determine whether the variable named in it exists. This function is an alternative to the ParameterExists function, which is deprecated.


1 Answers

<cfif structKeyExists(url, 'affiliateID') and trim(url.affiliateID) neq "">...</cfif>
like image 169
scrittler Avatar answered Sep 19 '22 21:09

scrittler