Professional Web Applications Themes

displaying query result of 0 as N/A - Macromedia ColdFusion

Hi I thought I could do this with an IsDefined function but I can't get it it to work. When I query my data I want to display a value of 0 (zero) for a certain field to be displayed as N/A. Can anyone help?...

  1. #1

    Default displaying query result of 0 as N/A

    Hi

    I thought I could do this with an IsDefined function but I can't get it it to
    work.

    When I query my data I want to display a value of 0 (zero) for a certain field
    to be displayed as N/A.

    Can anyone help?


    eggwater Guest

  2. #2

    Default Re: displaying query result of 0 as N/A

    You need to check for it with a <cfif>

    <cfif Value>
    #Value#
    <cfelse>
    N/A
    </cfif>
    Stressed_Simon Guest

  3. #3

    Default Re: displaying query result of 0 as N/A

    <cfif #TotalCredits# NEQ 0>
    #TotalCredits#
    <cfelse>
    N/A
    </cfif>

    would that bethe correct markup?
    eggwater Guest

  4. #4

    Default Re: displaying query result of 0 as N/A

    It is the same. With cfif, a value of zero is considered to be NO and any other value it considered to be YES.

    You way will work but if you wish to use it take out he # in the cfif ie:-
    Stressed_Simon Guest

Similar Threads

  1. Result not displaying in Flash
    By Gregory Nelson in forum Coldfusion Flash Integration
    Replies: 5
    Last Post: September 4th, 04:14 AM
  2. problems with displaying the result.cfm page
    By vasoulitsa in forum Coldfusion Database Access
    Replies: 21
    Last Post: September 16th, 10:37 AM
  3. Result XML page not displaying
    By mareal in forum ASP.NET Web Services
    Replies: 0
    Last Post: June 8th, 01:41 PM
  4. Replies: 5
    Last Post: August 11th, 02:56 PM
  5. displaying result from VBA into a control of form
    By mk sabeel in forum Microsoft Access
    Replies: 6
    Last Post: July 24th, 02:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139