M
|
Mark Kramer 3/1/2019 |
Hello listers, I would like to limit the data displayed in a chart when the chart is a detail of a table (using PHP Runner 9.8, latest build). I thought it could be done analogous to the procedure when displaying a table as a detail, which works with this code in "AfterTableInit":
|
W
|
wpl author 3/1/2019 |
In my case I use define a "session variable" in the After successful login. $_SESSION["your_var"] = $data[your_var]; Then on each page I want "query" in the "After table Initialized" I add $query->addWhere("your_var like '%".$_SESSION["your_var"] ."%'");
|
![]() |
Sergey Kornilov admin 3/1/2019 |
My guess is that with charts $_POST["mode"] is "listdetails". Chart data is produced by file dchartdata.php (you can find more details inspecting Network tab in Chrome). |
W
|
wpl author 3/2/2019 |
My guess is that with charts $_POST["mode"] is "listdetails". Chart data is produced by file dchartdata.php (you can find more details inspecting Network tab in Chrome). The easiest solution here is to create a copy of the chart and only use it in details mode. This way you can use a hardcoded statement $query->addWhere("year=2012"); to limit data.
|