propertyIsPresent()
Description
Returns true if the specified property exists on the model and is not a blank string.
Function Syntax
propertyIsPresent(property)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
property |
string |
Yes | |
Name of property to inspect. |
Examples
<!--- 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 --->
