Skip to content

Miscellaneous

propertyIsPresent()

propertyIsPresent() — returns any

Returns true if the specified property exists on the model and is not a blank string.

NameTypeRequiredDefaultDescription
propertystringyesName of property to inspect.
propertyIsPresent(property) <!--- Get an object, set a value and then see if the property exists --->
<cfset employee = model("employee").new()>
<cfset employee.firstName = "dude">
<cfreturn employee.propertyIsPresent("firstName")><!--- Returns true --->

<cfset employee.firstName = "">
<cfreturn employee.propertyIsPresent("firstName")><!--- Returns false --->