Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-21-2020 09:56 AM
I have a quite simple network model focused on individuals and companies and their connected identifiers. To ease viewing for analysts, I take the relationship
(:Person) - [PHONE] -> (:Phone)
And create a phoneNumber property on the Person node using the name property of the Phone node. I created a list such that it supports more than one PHONE relationship and stakes the numbers as a list. However, I use Linkurious as our visualization software and it does not technically support lists as a data type. The solution still works, but any suggestions on how to complete the same task, but not as a list? Below is example of what I run in Neo4j to make these automated phoneNumber properties on Person nodes.
MATCH (n)-[:PHONE]->(p:Phone) WITH n, COLLECT (p.name) as phone_list SET n.phoneNumber = phone_list
Thanks in advance!
09-28-2020 09:25 AM
Have you tried reduce (https://neo4j.com/docs/cypher-manual/current/functions/list/#functions-reduce😞 reduce(init = "", n IN phone_list| init + ","+ n.name+",") as phoneList (you've have to remove the trailling ',')
All the sessions of the conference are now available online