This topic is locked

Dashboards

12/25/2019 5:02:44 AM
PHPRunner General questions
S
Steve Seymour author

I have the standard table pages in a left bar menu.

I would like to be able to view a selected record/row in a dashboard.

The dashboard having single record, several linked detail pages and some custom buttons/links.
I can't see a way to pass the record/ row id from the initial table list view to the dashboard page.
Has anyone done this, or do you know a way to do it.
Thank you

Steve.

Sergey Kornilov admin 12/25/2019

Dashboards are multi-purpose kind of pages and not designed to be passed anything.
I guess you can try to save the record ID to be displayed on that View page in some session variable ($_SESSION["RecordID"]). Once View page is loaded as a part of the dashboard you can check that session variable and display the required record on that View page.
Something like this may work in BeforeProcess event of the View page:

if ($_SESSION["RecordID"]!="") {

$_SESSION["RecordID"]="";

header("Location: tablename_view.php?editid1=".$_SESSION["RecordID"]);

exit();

}
S
Steve Seymour author 12/26/2019



Dashboards are multi-purpose kind of pages and not designed to be passed anything.
I guess you can try to save the record ID to be displayed on that View page in some session variable ($_SESSION["RecordID"]). Once View page is loaded as a part of the dashboard you can check that session variable and display the required record on that View page.
Something like this may work in BeforeProcess event of the View page:

if ($_SESSION["RecordID"]!="") {

$_SESSION["RecordID"]="";

header("Location: tablename_view.php?editid1=".$_SESSION["RecordID"]);

exit();

}



Thank you Sergey.

I wondered if there was a phprunner way of doing it. I had the idea of using a session variable, but then I'd need to pass it the the dashboard page, then pick it up inside the dashboard page on a view section.

I think I'll have to abandon the dashboard idea as the list-page row-click events transfer to the dashboard list and It would end up in some weird loop.
Steve.