anarche
anarche

Reputation: 536

Neo4j return boolean shows blank value

This might be intentional behavior, but it appears returning a boolean attribute from a node returns a blank value unless it is cast to string, for example

return myNode.isValSet returns a blank value

whereas

return toString(myNode.isValSet) returns true or false

Is it possible to return the boolean value in cypher without the cast to string?

Upvotes: 1

Views: 253

Answers (1)

Bruno Peres
Bruno Peres

Reputation: 16375

I reproduced your scenario here. This is only a bug in the output of Neo4j Browser. Look:

CREATE (myNode {isValSet:true}) // create myNode with isValSet = true

Querying:

MATCH (myNode)
RETURN myNode.isValSet

The result in the "Table" mode is blank as described by you:

"Table" mode

But when I change the visualization to "Text" the true value is shown:

"Text" mode

Searching in the neo4j-browser Github hepo I found a closed issue about it and a commit fixing it. This fix will probably available in a next release.

Upvotes: 2

Related Questions