Custom function - Transformation

nferrara

New member
Dear Eugenio,
Recently you told me : ".../... if in your xls you don't have the value of the PK, you can use a transformation function that, through a query, get the PK value before inserting the value in the DB (check transformation functions in the documentation)".

I did not find an example of "transformation functions in the documentation".

In my case : in mass import, get the id_problematiques value from the varchar problematique and get the id_techniques value from varchar technique before inserting values in the DB.

My sql tables :
1) table "problematiques" :
- id_problematiques : primary key
- problematique : varchar

2) table "techniques" :
- id_techniques : primary key
- technique : varchar

3) table "correspondances" :
- id_correspondances : primary key
- problemantique : varchar
- technique : varchar

Thanks a lot.
Best regards

You are using DaDaBIK version 11.12-Elba enterprise,
System info
PHP Version: 8.1.28
mysql version: 10.6.17-MariaDB
 

eugenio

Administrator
Staff member
There is an example of transformation function in the documentation, chapter 11 "Import data from MS Excel/CSV/ODS" subchapter "Transformation functions".

Best,
 
Top