cancel
Showing results for 
Search instead for 
Did you mean: 

Condition Based Output

vence_andersen1
Graph Buddy

As you see in image, A is connected to B,C,F,G. When I query A like "Match (n:Label{Name:'Name'})", it's actually returning me B,C,F,G which is right, but I want "B" to be returned only if I query "A","D","E", like if the values of A,D,E are true.

Here D, E could be connected to something else, but when the values of A,D and E are true only then B should be given. Can I achieve that?

2 REPLIES 2

Cobra
Ninja
Ninja

Hello @vence.andersen17

Did you have a look at CASE expression and APOC conditional cypher execution?

Regards,
Cobra

vence_andersen1
Graph Buddy

Yeah, but what I am trying here is, when I query "A" like "Match (n:label{Name:'A'}) return n", I need the output to show only A and when I expand it's nodes I need to get only "C","F" and "G". Is that possible?

Like "B" should be given only when I query "A","D" and "E" at the same time.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.