Page 1 of 1

CSV import and lookup field contradict each other [5.97]

Posted: 2021-07-18 09:43
by sacgtdev
I am trying to do csv upload for fields with cascading drop down.

Advanced sql appended to the default:

WHERE `tablename`.`field` = '1' // added before ORDER BY 2 -> the form entry still working

The csv import not able to load the correct id from the primary table. Query log display the SQL syntax error.

It should be WHERE `tablename`.`field` = '1' AND //added AND - then the csv import seems to be able to get id from primary table

However, this render the form entry doesn't work anymore.

Re: CSV import and lookup field contradict each other [5.97]

Posted: 2021-07-18 14:07
by sacgtdev
My temporary solution is :


include incFunctions.php in lib.php

create the following files in hooks:
import_csv.php
//create custom function for $transformFunctions

incFunctions.php
//create custom function for lookupQuery and pkGivenLookupText