How to use user defined postgresql functions with datatables editor?

How to use user defined postgresql functions with datatables editor?

larsbuntemeyerlarsbuntemeyer Posts: 1Questions: 1Answers: 0

Hey, i have a question about how to use my own postgresql functions with the editor. I have managed to implement quite a lot of functionalities but I am still struggling with this. For example, I created my own insert function that will automatically insert data into a child table and it's parent table and will handle some constraints. How can I call it using the Create Button? I got into this solution (https://datatables.net/forums/discussion/13298/creating-custom-add-edit-remove-function) but it's a little complex for me, maybe there is a more recent solution?
Basically, what I need is a custom button (I managed to create that one) that calls my postgresql function, but then I wouldn't know how to grab the data from the input form! Can you maybe give a simple example how to call custom functions? Thanks a lot!

Answers

  • allanallan Posts: 63,505Questions: 1Answers: 10,471 Site admin

    So stepping back for a moment, do you want Editor to insert into the parent table as normal, but you also want to be able to call a function that will insert into a child table? if so, then server-side events are how to do it.

    Allan

This discussion has been closed.