If not empty cfif statement

page is always displaying things inside cfif when it shouldnt

Page 1 of 1

1 Replies - 7176 Views - Last Post: 12 November 2009 - 12:20 PM Rate Topic: -----

#1 stefan.legg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 17-February 09

If not empty cfif statement

Posted 12 November 2009 - 11:23 AM

Basically on my page here is a title for a person, and a description for that title. These are both pulled from a database, and there is a comma inside the cfif to seperate those two bits of info....so if there is nothing in those fields, the comma shouldnt be put on the page b/c its inside my cfif statement....

I've tried a few different cfif statements, none of which have worked.
such as:
<cfif facultyinfo.Title2 NEQ "" OR facultyinfo.title2 NEQ " ">
<cfif len(trim(facultyinfo.Title2)) NEQ "">
<cfif NOT len(trim(facultyinfo.Title2)) is "">
<cfif isDefined("facultyinfo.Title2")>




any ideas? :)

Is This A Good Question/Topic? 0
  • +

Replies To: If not empty cfif statement

#2 stefan.legg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 17-February 09

Re: If not empty cfif statement

Posted 12 November 2009 - 12:20 PM

fixed this.
used the isDefined, and set that item in the DB to null instead of just blank
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1