cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Using property values in toBoolean vs. typed in text

I'm trying to use a property (k.rule) that holds an expression to be evaluated as true/false. When I pass it into the function toBoolean, I get a null result. If I type it directly into the function, I get the expected result.

match (Size:Question {name: "Size"}),(height_adjustment:Question {name: "Height Adjustment"}),( question {name: "Height Adjustment"})-[k:HAS_OPTION]-(options) return question.name,options.name,Size.answer,k.rule,toBoolean(Size.answer = "a size"),toBoolean(k.rule)

I want toBooolean(k.rule) to evaluate the same as the typed in value toBoolean(Size.answer = "a size").

Any hints are appreciated.

1 REPLY 1

that doesn't work with toBoolean() you can probably use the function apoc.cypher.runFistColumn("return "+k.rule, {... params ..})