Miscellaneous
propertyIsPresent()
Signature
Section titled “Signature”propertyIsPresent() — returns any
Description
Section titled “Description”Returns true if the specified property exists on the model and is not a blank string.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
property | string | yes | — | Name of property to inspect. |
Examples
Section titled “Examples”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 --->