Help with Cypher using apoc on Bloom scene action

I would like to have a scene action to merge nodes. I am trying the following cypher, but it doesn't work on Bloom. I couldn't find an explanation from the documentation alone. Could any one help please?

MATCH (n)
WHERE id(n) in $nodes
WITH collect(n) as nodesList
CALL apoc.refactor.mergeNodes(nodesList, {properties:"combine", mergeRels: true})
YIELD node
RETURN node

I am not a Bloom user, but I am wondering if it is possible to have 'write' operations for actions.

What happens? Does it return an error message?

I can confirm that it is possible to create nodes and relationships via actions.

There is no error message.

I found a very similar post here, but the author concluded it might be a bug on Bloom or something.

I wonder if there is any work around to easily merge nodes in the UI.

Maybe try elementId instead of id. The documentation has id within the text, but elementId in a snapshot of an example scene action.

Thanks for the suggestion, but that doesn't work.

Hi Daniel,

I would like to do the same thing and have run into the same problem. I am in Bloom version 2.11.0 running on a local DBMS in version 5.26.0. I went into "Experimental Features" and switched on "allow write transactions", and also made sure to tick the option in the Scene Action window to designate the query as a "Write transaction"

I tried:

//merge selected nodes
MATCH (e1:Entity WHERE id(e1) IN $nodes), (e2:Entity WHERE id(e2) IN $nodes)
WITH head(collect([e1,e2])) as nodes
CALL apoc.refactor.mergeNodes(nodes,{
  properties:"combine",
  mergeRels:true
})
YIELD node
RETURN node;

I used 'id' rather than 'elementId', as I'd had issues with 'elementId' in other scene actions, but tried both and neither worked.

As I've been playing with this, I've noticed that my designation of the scene action as a "write transaction" doesn't save. Each time I open the scene action to make an edit, that box is unchecked. Is this perhaps the culprit behind the scene action failing to execute any changes? Is there some sort of compatibility issue here between apoc functions and the ability to save as a "write transaction"?

@jsnyder83

As you are using Bloom 2.11.0 it should be noted this was released 1.5 yrs ago, November 2023 and the current Bloom release is 2.20.0. Though I have not investigated anything beyond this but any chance of upgrading?