Custom action for MySQL Row update


I am creating a CRUD interface on a Metabase DashBoard for following after-sale cases. My actions for the creation and deletion work, but I have problems with the update part.

The basic update action works, but I wanna to improve it, so I created a custom one. My problem is that the form opened via this action has empty fields, I mean the the current data of the row are not displayed.

Here is my action query:

UPDATE adv_sav_qualite
SET no_dossier= {{Numero_du_dossier}}
, id_adv={{Adv_en_charge}}
, date_demande={{date_demande}}
, zone_geo={{zone_geo}}
, id_client={{id_client}}
, nom_client={{nom_client}}
[[, date_achat={{date_achat}}]]
[[, no_fact={{Numero_de_facture}}]]
, code_article={{code_article}}
, lib_article={{libelle_article}}
, qte={{Quantite}}
[[, no_cf=IF(no_cf <> {{Numero_de_CF}}, {{Numero_de_CF}}, no_cf]]
[[, no_ctn={{Numero_de_container}}]]
[[, fournisseur={{Fournisseur}}]]
[[, pu={{PU}}]]
[[, act_achats={{Actions_achats}}]]
, desc_pbl={{Motif_demande}}
[[, coms={{Commentaires}}]]
[[, cout_sav={{Cout_sav}}]]
, statut={{statut}}
[[, no_cde_sav={{Numeor_de_cde_sav}}]]
[[, no_avoir={{Numero_d_avoir}}]]
[[, row_case.lien_photos={{lien_photos}}]]
WHERE row_case.id_case={{id_case}};

Could someone help me?


Anyone can help me?

I don’t understand the issue you’re having, can you post examples with pictures?

Hi Luigi,

With the basic update action (the one automaticaly generated) I got all the existing data displayed into the form:

With my custom action, the existing data are not loaded into the form:

The update works with both of them, but the basic action is ...basic too much lol. So I would like to use my custom one but viewing the existing data like in the basic one.

Thanks for your assistance,