Problem import CSV and lookup fields

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
stefdefrance
Posts: 14
Joined: 2014-12-05 18:34

Problem import CSV and lookup fields

Post by stefdefrance » 2022-12-01 12:21

Hello,

I have a question when I import CSV files, all is OK and datas are in my database (verification with PHP MYADMIN)
When I use the appgini application, datas are invisible for the lookup fields...
I think it's because values of lookup fields are Integer.
How to do the impot correctly please ?

Thanks !

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 352
Joined: 2013-03-21 04:37

Re: Problem import CSV and lookup fields

Post by peebee » 2022-12-02 00:24

Yes, you are correct.

The lookup field in the table being imported into will need to be an integer rather than the text value.

You will need to match the corresponding parent table primary key integer ID value of each lookup field/row to be imported.

It depends on what and how much data you have to import but with some basic knowledge of how to use a spreadsheet, you can do that relatively easily in the CSV prior to import. If only a few, just use find/replace. For a lot of edits you can set up a template and use the vlookup (or the new xlookup) function to get the values. There are other ways to go about it (custom scripts, SQL after import) but it really depends on what's in the CSV import you are provided with. Generally speaking, Excel or similar will do the job for you.

Post Reply