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.

APOC trigger for updating node property

Hi,

I added trigger:

CALL apoc.trigger.add('updateprop','UNWIND {assignedNodeProperties} AS prop with prop.node as n SET n.tsupd = timestamp()', {phase:'before'});

then
I did some changes

But trigger does nothing
Is it ok ?

I wanted to add/update property in case any of node properties was changed.

Any idea ?

Regards,
Cezary

1 ACCEPTED SOLUTION

Check if you have enabled triggers in configuration apoc.trigger.enable=true and change your payload statement to

UNWIND apoc.trigger.nodesByLabel({assignedNodeProperties},null) AS n SET n.tsupd = timestamp()

View solution in original post

2 REPLIES 2

Check if you have enabled triggers in configuration apoc.trigger.enable=true and change your payload statement to

UNWIND apoc.trigger.nodesByLabel({assignedNodeProperties},null) AS n SET n.tsupd = timestamp()

Hi Stefan,

Thanks ! that payload works