House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

cannot convert the value "x" to a boolean

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

cannot convert the value "x" to a boolean

>You can check to see if a value can be treated as a boolean by Tom Small 04/30/2012 07:57 AM
You can check to see if a value can be treated as a boolean by Raymond Camden 04/30/2012 07:52 AM
----- Excess quoted text cut - see Original Post for more ----- Tom Small 04/30/2012 07:46 AM
I see two issues. First, you are trying arguments.query like a list, Raymond Camden 04/30/2012 07:33 AM
Hi, I have a loop that searches for keywords, although when I search for Tom Small 04/30/2012 07:28 AM

04/30/2012 07:57 AM
Author: Tom Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:63882#350885 >You can check to see if a value can be treated as a boolean by >checking isBoolean(). > > >> Hi Ray thanks
04/30/2012 07:52 AM
Author: Raymond Camden Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:63882#350884 You can check to see if a value can be treated as a boolean by checking isBoolean(). ----- Excess quoted text cut - see Original Post for more -----
04/30/2012 07:46 AM
Author: Tom Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:63882#350883 ----- Excess quoted text cut - see Original Post for more ----- Hi Ray thanks for the reply. Can you tell me how I should treat the boolean, and do I need to place the boolean within an cfif statement? Appreciate your advice. Tom
04/30/2012 07:33 AM
Author: Raymond Camden Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:63882#350882 I see two issues. First, you are trying arguments.query like a list, but you don't use the value. Ie, you said, loop over it and put the value in "keyword", but your code never uses it. Secondly - you seem to be wanting to treat the keywords as booleans. That's not going to work. ----- Excess quoted text cut - see Original Post for more -----
04/30/2012 07:28 AM
Author: Tom Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:63882#350881 Hi, I have a loop that searches for keywords, although when I search for 'string' values get an error: cannot convert the value "x" to a boolean. If I remove the statement: u.isactive = <cfqueryparam value="#IIF(arguments.query, 1, 0)#"> then only finds 'string' keywords with no errors. If I run the code below it only finds 'boolean' keywords and when I enter a 'string' value produces the error above. This is a snippet of my code: <cfloop list="#arguments.query#" index="keyword" delimiters=" ,;"> WHERE u.email LIKE <cfqueryparam value="%#arguments.query#%"> OR       r.rolename LIKE <cfqueryparam value="%#arguments.query#%"> OR         u.isactive = <cfqueryparam value="#IIF(arguments.query, 1, 0)#"> </cfloop> Thanks Tom
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

June 20, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             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             

Designer, Developer and mobile workflow conference