Hello everyone,
I'm having trouble updating data in a JSONB field from my postgres database, and I could really use some help.
Here's my setup:
-
Field Configuration: I've set up my database field type as
JsonB
, and the data type asArray
, as shown in the image below.
-
Data Structure: My data is organized like this:
[{"processo":"861427/2010","paeEntregue":null,"rfpEntregue":null,"requerimentoDePesquisa":null,"licencaDeOperacaoObtida":"2023-10-23","pedidoDeConcessaoDeLavra":null,"requerimentoDeLavraAprovado":"2020-05-18","validadeDaLicencaDeOperacao":"2028-10-18"},{"processo":"861428/2010","paeEntregue":null,"rfpEntregue":null,"requerimentoDePesquisa":null,"licencaDeOperacaoObtida":"2023-10-23","pedidoDeConcessaoDeLavra":null,"requerimentoDeLavraAprovado":"2020-02-21","validadeDaLicencaDeOperacao":"2028-10-18"},{"processo":"861430/2010","paeEntregue":null,"rfpEntregue":null,"requerimentoDePesquisa":null,"licencaDeOperacaoObtida":"2023-10-23","pedidoDeConcessaoDeLavra":null,"requerimentoDeLavraAprovado":"2020-02-21","validadeDaLicencaDeOperacao":"2028-10-18"},{"processo":"861431/2010","paeEntregue":null,"rfpEntregue":null,"requerimentoDePesquisa":null,"licencaDeOperacaoObtida":null,"pedidoDeConcessaoDeLavra":null,"requerimentoDeLavraAprovado":"2020-02-21","validadeDaLicencaDeOperacao":null},{"processo":"861694/2010","paeEntregue":null,"rfpEntregue":null,"requerimentoDePesquisa":null,"licencaDeOperacaoObtida":null,"pedidoDeConcessaoDeLavra":"2016-04-26","requerimentoDeLavraAprovado":"2020-11-27","validadeDaLicencaDeOperacao":null}]
-
Workflow: I created a workflow for loading the data:
-
Server Connect: This workflow is used to populate a table with the data from my database.
This allows me to display all the relevant information on the frontend:
The problem I'm facing now is updating this information using a modal form. I understand I probably need a workflow for this, but I'm not sure how to correctly send the updated data to the backend for updating the JSONB field.
Could anyone provide some guidance or a step-by-step example on how to set up this workflow to handle updates? Any help would be greatly appreciated!