i use custom query with lookup filed
Code: Select all
SELECT `Employee`.`ID`, IF(CHAR_LENGTH(`Employee`.`Code`) || CHAR_LENGTH(`Employee`.`EmployeeName`), CONCAT_WS(\'\', `Employee`.`Code`, \' - \', `Employee`.`EmployeeName`), \'\') FROM `Employee` LEFT JOIN `Nationality` as Nationality1 ON `Nationality1`.`ID`=`Employee`.`Nationality` LEFT JOIN `Job_Title` as Job_Title1 ON `Job_Title1`.`ID`=`Employee`.`Job_Title` LEFT JOIN `Employee` as Employee1 ON `Employee1`.`ID`=`Employee`.`Supervisor` LEFT JOIN `Work` as Work1 ON `Work1`.`ID`=`Employee`.`Work_Status` LEFT JOIN `Status` as Status1 ON `Status1`.`ID`=`Employee`.`Status` LEFT JOIN `Sponsor` as Sponsor1 ON `Sponsor1`.`ID`=`Employee`.`S_Name` where `Employee`.`Active` ="Active" ORDER BY 2
Code: Select all
where `Employee`.`Active` ="Active"
thanks a lot