Question on my CF IF Statement?

Experts,

I have this CFIF statement and it is not displaying/finding the "EV" grp and the "EVENTS" name from the query.
I am thinking that there is something wrong with how I have coded the CFIF statement.

Basically, I am trying to output the two grp (groups) "DT" and "EV".
I have several grp (groups) identified in the table, and I want to show the "EV" grp with the "DT" grp only.

Can someone take a look at my code?

///////////////////////////////////////////////////////////////////////////
<cfelseif Trim(grp) is "DT" or Trim(grp) is "EV">
<cfif IsDefined("Cookie.adminID_cmcal2")>
<a href="caledit.cfm?RecordID=#id#&Direction=#url.direction#" title="#eventdescription#">
<FONT FACE=ARIAL color="green" size="-2">#name#-<i>#reasonout#</i></A></FONT><br>
<cfelse>
<cfif name IS "EVENTS">
<FONT FACE=ARIAL color="green" size="-2"><a href="##" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">HOLIDAY</a></i></FONT><br>
<CFELSE>
<FONT FACE=ARIAL color="green" size="-2">#name#-<i>#reasonout#</i></FONT><br>
</cfif>
</cfif>
///////////////////////////////////////////////////////////////////////////
LVL 1
g118481Asked:
Who is Participating?
 
incapitalCommented:
You don't have end tags for all your <cfif> tags. I'm assuming that this is just an excerpt, and that that's not the cause of yoru problem.

First off, I would try just outputting the value you're trying to examine:

<cfoutput>#trim(grp)#</cfoutput>

If you're not getting inside that elseif block, then your condition isn't evaluating to 'true'. Take a look at the data and make sure that you're getting that values you expect there.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.