CSV import and lookup field contradict each other [5.97]

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
sacgtdev
Veteran Member
Posts: 75
Joined: 2020-06-10 11:14

CSV import and lookup field contradict each other [5.97]

Post by sacgtdev » 2021-07-18 09:43

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.

sacgtdev
Veteran Member
Posts: 75
Joined: 2020-06-10 11:14

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

Post by sacgtdev » 2021-07-18 14:07

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

Post Reply