The methods I have been trying out from the PHPRunner 7.1 docs are not giving me what I want so I will lay the case out here.
I have a List page that shows appointments booked with the column values in a horizontal row.
The KEY id, named "id" for each row of records shows up first like this:

There is a Custom Expression for that id field that wraps the ID with a link to an ADD Page form to create a Reports record that also stores the "id" value of the Calendar appointment record.
The custom expression passes other values like this:
$value="<a href='reports_add.php?&apoort=".$data["ort"]."&aponame=" .$data["kunde"]."&apostrasse=" .$data["strasse"]."&apoplz=" .$data["plz"]."&ansprech=" .$data["ansprech"]. "&promotiondate=" . $data["DateField"] . "&sap=".$data["kdnr"]."&trainername=".$data["trainername"]."&aussendname=".$data["aussendname"]."&lieracphyto=".$data["lieracphyto"]."&promotiondate=".$data["DateField"]."&calcalendarid=".$data["id"]. " '> Report erstellen >> ".$data["id"]. "</a>"
the Link that this makes on the Calendar List page looks like this;

What I am trying to do is to PREVENT more than 1 Report to be posted on the Reports_add form by querying the Reports table to see if it finds one row named "calcalendarid" with the same number value, such as "1", and REMOVING the LINK built around the Calendar Id, and simply reverting it to an ID number . The link Report erstellen >> 1 is overwritten by simply "1" or "2", etc.
I have tried code like this in the Calendar list page in function BeforeProcessList($conn, $pageObject)
[code]global $conn;
$strSQLExists = "select calcalendarid from reports where calcalendarid='".$data["id"]. "'";
$rsExists = db_query($strSQLExists,$conn);
$data=db_fetch_array($rsExists);
if($data)
{
$record["id_fieldcolumn"]=false;
}
else
{
$record["id_fieldcolumn"]=true;
}
and variations of this code using
Example only!
$new_variable = "Nothing here, move along";
$xt->assign("id_fieldcolumn",$new_variable);
At any rate, I am puzzling over this!