Professional Web Applications Themes

IsDefined - evaluate testing error - Macromedia ColdFusion

I am going thru an index loop (count is the variable) ... all is fine... but some form items don't exist (varied reasons) so the loop will sometimes encounter a non existing var. so I tried to test with --IsDefined-- but it says error - that the var can't be found - which I thought was the whole point ... what am I doing wrong? How do I test for this? <CFIF IsDefined("#Evaluate('form.thecode'&'#count#')#")>...

  1. #1

    Default IsDefined - evaluate testing error

    I am going thru an index loop (count is the variable) ... all is fine... but
    some form items don't exist (varied reasons) so the loop will sometimes
    encounter a non existing var. so I tried to test with --IsDefined-- but it
    says error - that the var can't be found - which I thought was the whole
    point ... what am I doing wrong? How do I test for this?

    <CFIF IsDefined("#Evaluate('form.thecode'&'#count#')#")>

    revdave Guest

  2. #2

    Default Re: IsDefined - evaluate testing error

    I may be wrong, but isn't the evaluate() function what is throwing the
    undefined error? In other words, I believe that you are trying to evaluate
    something that doesn't exist, so you are failing before you even get to
    IsDefined.

    paross1 Guest

  3. #3

    Default Re: IsDefined - evaluate testing error

    Dave, you don't need the evaluate function.

    try this instead...

    <cfif isDefined('form.thecode#count#')>
    aredovian Guest

Similar Threads

  1. isDefined sketchiness
    By sofanova in forum Macromedia ColdFusion
    Replies: 4
    Last Post: March 10th, 09:27 PM
  2. <cflock> with isdefined...help.
    By Supra LTD in forum Macromedia ColdFusion
    Replies: 3
    Last Post: March 4th, 07:39 AM
  3. Using IIf() with IsDefined()
    By mate of the state in forum Macromedia ColdFusion
    Replies: 6
    Last Post: March 3rd, 06:20 PM
  4. #26262 [Opn->Bgs]: Error in evaluate logical expression
    By iliaa@php.net in forum PHP Development
    Replies: 0
    Last Post: November 15th, 05:56 PM
  5. #26262 [NEW]: Error in evaluate logical expression
    By updates at mail dot ru in forum PHP Development
    Replies: 0
    Last Post: November 15th, 02:35 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