This topic is locked

Capture value...

10/13/2009 11:32:05 PM
PHPRunner General questions
D
doykoes author

Hi,...

Please help me with this...

How can I capture (copy) value from mastertable (listpage) before I add (addpage) in detailtable...

I Use $GET["myvalue"] as in master table isn't get any value
Please somebody help..

J
Jane 10/14/2009

Hi,
you can select values from master table in the Add page: Before processevent for detail table, save it in the session variable and then use this variable as default value on the "Edit as" settings dialog.

Here is a sample code:

global $dal,$strTableName;

$rstmp = $dal->MasterTable->Query("MasterKey=".$_SESSION[$strTableName."_masterkey1"],"");

$datatmp = db_fetch_array($rstmp);

$_SESSION["FieldName"] = $datatmp["FieldName"];
D
doykoes author 10/14/2009



Hi,
you can select values from master table in the Add page: Before processevent for detail table, save it in the session variable and then use this variable as default value on the "Edit as" settings dialog.

Here is a sample code:

global $dal,$strTableName;

$rstmp = $dal->MasterTable->Query("MasterKey=".$_SESSION[$strTableName."_masterkey1"],"");

$datatmp = db_fetch_array($rstmp);

$_SESSION["FieldName"] = $datatmp["FieldName"];



Thank you Verry much

Is usefull....