This topic is locked

New feature badly needed

5/17/2009 9:02:44 AM
PHPRunner General questions
V
vytb author

In cases, when the layers 'master/child' and child tables are numerous, the access to the particular child table of a particular master table becomes too complicate to the users.
One way to solve this problem is to offer a possibility on the list page (button or else) to 'lock' the application on this particular master key (session variable?) and another one to return to the usual state. Then whole main menu may be used to see all the child tables related to this particular master in one layer.
May you offer a sample code for this? Or maybe other solutions are available?

J
Jane 5/18/2009

Hi,
here are some tips:

  1. create these button manually on the Visual Editor tab.

    Here is just a sample:
    <input type=button value=button1 onclick="window.location.href='tablename_list.php?masterkey={$fieldname_value}';">


2. check passed variable and save it in the session variable.
3. then add where clause based on the session variable in theList page: Before SQL query event if needed.

V
vytb author 5/18/2009

Hi,

here are some tips:

  1. create these button manually on the Visual Editor tab.

    Here is just a sample:
  2. check passed variable and save it in the session variable.
  3. then add where clause based on the session variable in theList page: Before SQL query event if needed.


Thank you Jane.
From what I understand, such a solution will require to put these buttons on every child's list page and to use only them, etc. and this won't make much difference in comparison with already imbedded possibilities.
However, I wonder if it is possible to limit at once a whole system of tables/pages based on the one primary (let's say, a customer) key value and unlock it when needed.
In that case, using the main menu would show the records of the particular customer only for all the menu items. Now it is possible using the search box, but you have to repeat 'search' for every menu item/list pages... I wonder if it's possible to impose a kind of general 'where' with the possibility to cancel it at once for all the menu items/list pages. Maybe a future feature?

J
Jane 5/19/2009

Hi,
you can check passed variable in one event and save it in the session variable.

Then check this session variable in anyBefore SQL query event and add where clause if needed.