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.

Condition Based Output

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

Hello @vence.andersen17

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

Regards,
Cobra

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.