intercept ajax returned picklist

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sticcino
User
Posts: 1043

intercept ajax returned picklist

Post by sticcino »

Hi,

is it possible to intercept the ajax call for a field so that one of the values that is returned can be replaced with the the text value of that field (lookup)?

field: P.O
enter 142
returns
1426026399, 2014-07-03, 12

where the "12" is the vendor ID which i want to look up and replace with the name as:
1426026399, 2014-07-03, PhpMaker Inc.
1426026500, 2014-07-03, aspMaker Inc.
etc...
Is there an optimal location to do this, or can I alter the source sql statement to lookup the vendor name

Thanks,
Johnny


sticcino
User
Posts: 1043

Post by sticcino »

in the xxx_edit.php:
we have:

$sSqlWrk = "SELECT PO_No, PO_No AS DispFld, PO_Date AS Disp2Fld, PO_Vendor AS Disp3Fld, PO_Notes AS Disp4Fld FROM PO_HDR";
$sWhereWrk = "PO_No LIKE '%{query_value}%' OR DATE_FORMAT(PO_Date, '%m/%d/%Y') LIKE '%{query_value}%' OR PO_Vendor LIKE '%{query_value}%' OR PO_Notes LIKE '%{query_value}%' OR CONCAT(PO_No,'" . ew_ValueSeparator(1, $Page->WHSE_PO) . "',DATE_FORMAT(PO_Date, '%m/%d/%Y'),'" . ew_ValueSeparator(2, $Page->WHSE_PO) . "',PO_Vendor,'" . ew_ValueSeparator(3, $Page->WHSE_PO) . "',PO_Notes) LIKE '{query_value}%'";

Is it as "simple" as altering the above sql_statement.

as it is in teh core php file,i'm assuming there is no other location i can trap it so, i don;t have to keep altering the edit.php file

Thanks
Johnny


sticcino
User
Posts: 1043

Post by sticcino »

ok, got it to work.....
so also have to alter the sql statements n the view.php and add.php files....

just have to remember not to overwrite those files now....

Thanks ,
Johnn,


Post Reply