Skip to main content
September 12, 2008
Question

CFIF Contains question

  • September 12, 2008
  • 2 replies
  • 5312 views
How do I get the code below to work?
    This topic has been closed for replies.

    2 replies

    Inspiring
    September 12, 2008
    1. get rid of the octothorps in your cfif tag.
    2. depending on what you are trying to accomplish, either replace the cfelseif tags with cfelse tags, or, put a condition inside those tags.
    Inspiring
    September 12, 2008
    PopcornCoder wrote:
    > How do I get the code below to work?
    >
    > <cfset disco = "abis">
    > <cfif #disco# CONTAINS "a">Yes<cfelseif>No</cfif>
    > <cfif #disco# CONTAINS "l">Yes<cfelseif>No</cfif>

    <cfif find(disco,'a')>YES<cfelse>NO</cfif>
    OR (depending of if you care about case or not)
    <cfif findNoCase(disco,'1')>YES<cfelse>NO</cfif>