Can I use a function to handle the update in the crudAction create?

I'm using the low-code platform FileMaker. It contains data about nodes and shapes for the palletes, and I'm getting that information into a "Web Viewer" object found in this platform along with all the JS. 

GalleyDiagram.jpg

Since FileMaker is a database application, it holds the records. I can trigger the FileMaker platform from this web viewer object to run a script to update some records in the various tables.

In order to do that, I need to be able to run a JS function to pass the data back to FileMaker.

Can I use a function somewhere in the diagram options to send the data back?

If not that: how do I get all the nodes in a diagram as an array? This would be an alt method for me as I could run my own JS function at a time to send the nodes back to FileMaker.

Thank you!


3 Replies

SJ Sivaranjith Jeyabalan Syncfusion Team August 15, 2023 10:37 AM UTC

Hi Jeremy,

We will validate and update you with more details on August 17, 2023. 

Regards,

Sivaranjith.



JB Jeremy Brown replied to Sivaranjith Jeyabalan August 15, 2023 01:28 PM UTC

Thank you. I appreciate it. Looking to see what all I can do wi



BM Balasubramanian Manikandan Syncfusion Team August 16, 2023 04:25 PM UTC

Use the saveDiagram method to save the diagram nodes. We have rendered a sample to meet your requirements. In this example, we saved the diagram and obtained the nodes by parsing the diagram JSON. We then printed the nodes collection in the console window. Please refer to the code example, documentation, and sample provided below.


Code Snippet

   document.getElementById("save").onclick = () =>{

      load = diagramInstance.saveDiagram();

      let getDiagram = JSON.parse(load);

      console.log(getDiagram.nodes);

    }


Documentation

https://ej2.syncfusion.com/react/documentation/diagram/serialization


Sample

https://stackblitz.com/edit/react-94qz4k-sflevy?file=index.html


Loader.
Up arrow icon