I have tried adding this in hooks/import-csv.php
Code: Select all
$transformFunctions['testtable'] = function($data, $options = []) {
// new definition here
// then you must return transformed data
if($data['ContractID'] === '' ) {
exit;
}
if($data['Name'] === '' && $data['UnitIdentifer'] === '' ) {
exit;
}
if(pkGivenLookupText($data['ContractID'], 'testtable', 'ContractID') == '' ) {
exit;
}
return $data;
};
Code: Select all
if(pkGivenLookupText($data['ContractID'], 'testtable', 'ContractID') == '' ) {
exit;
}