YesNoFormat

Description

Evaluates a number or Boolean value.

Returns

Yes, for a nonzero value; No for zero, false, and no Boolean values, and an empty string ("").

Function syntax

YesNoFormat(value)

Parameters

Parameter

Description

value

A number or Boolean value

Example

<h3>YesNoFormat Example</h3> 
<p>The YesNoFormat function returns non-zero values as "Yes"; zero, false and no Boolean values, and empty strings ("") as "No". 
 
<cfoutput> 
<ul> 
    <li>YesNoFormat(1):    #YesNoFormat(1)# 
    <li>YesNoFormat(0):    #YesNoFormat(0)# 
    <li>YesNoFormat("1123"):    #YesNoFormat("1123")# 
    <li>YesNoFormat("No"):    #YesNoFormat("No")# 
    <li>YesNoFormat(True):    #YesNoFormat(True)# 
</ul> 
</cfoutput>