Question on my CF IF Statement?


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>
<cfif name IS "EVENTS">
<FONT FACE=ARIAL color="green" size="-2"><a href="##" onmouseover="doTooltip(event,0)" onmouseout="hideTip()">HOLIDAY</a></i></FONT><br>
<FONT FACE=ARIAL color="green" size="-2">#name#-<i>#reasonout#</i></FONT><br>
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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:


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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.