Page 1 of 1

Could not delete the record Message

Posted: 2022-09-12 05:29
by SkayyHH
I have a question about the AppGini messages.

If I want to delete a data record that is related to another table, I get the message that the data record cannot be deleted because it is dependent on table "XYZ".

Example: "Could not delete the record due to the presence of 1 related record(s) in table [absence_de]"

I would have liked to see the description of the table instead of the database name here. So that a user also knows which table is behind it. Can someone help me change that? Did anyone else do this before? Any tipps?

Exampel what i´m looking for: "Could not delete the record due to the presence of 1 related record(s) in table [Employee Status]"

Many thanks for your help!

Re: Could not delete the record Message

Posted: 2022-09-12 20:22
by pbottcher
Hi,

chech in the TABLENAME_dml.php file and search for the TABLENAME_delete function.

Here you should see per child entry a line like

$RetMsg = str_replace("<TableName>", "CHILDTABLENAME", $RetMsg);

change the CHILDTABLENAME to the respective information you want to display.

!! This file will be overwritten if you regenerate your project.

Re: Could not delete the record Message

Posted: 2022-09-12 21:45
by SkayyHH
Thanks so much! Do you know PowerGreb? It is a great search and replace in files tool. A lifesaver when appgini overwrites the files again. :-)