This topic is locked

Setup of master/child records

11/9/2009 10:29:20 AM
PHPRunner General questions
D
DavidT author

I am trying to decide how to setup my tables and screens to handle the following requirements. Any help or suggestions as to how it can be done would be very much appreciated.
There is a table of client records that contains basic client information. These can only be created by user class A.

There is additional information for each client (perhaps on the same table, perhaps on another with a 1-1 relationship) that can only be updated by user class B.

There is a third set of data for each client that contains the interactions with this client, so it may have multiple records per client. These can only be updated by user class C.
So, I need a basic list/add/update/delete for class A that allows for the entry of the basic info.

I need another set of screens only available to class B that allows editing of the additional info, but not deletion. It must show some read only info from the first set of data (i.e. client name).

There is a third set of screens that are only available for class C that also need to show the master info (client name) in addition to the interaction info.
Is it best to split A & B into 2 tables, or should they be one table?

  • If 2, how can I show the info from A as display only when updating B? How can I create/delete a record on B whenever I create/delete one on A?
  • If 1 table, I understand how to show limited fields on A, but how do I show some as read only and some as input when editing on screen B?
    Also, I found some stuff in the help about master/child, but it still isn't obvious how I should create a list screen of clients so as to be able to add the child records.
    I also need 3 list screens for the client data, one for each user class, each that do slightly different things (A will allow update of basic info, B will update extended info, C will add child records).
    I hope this makes sense. I have tried a few things, but nothing seems to be working as I hoped.
    Thanks.

J
Jane 11/10/2009

David,
firstly I recommend you to have a look at the PHPRunner security settings. You can set up different permissions for each user group on the User group permissions dialog on the Security tab.

http://www.xlinesoft.com/phprunner/docs/user_group_permissions.htm
To show data from tableA on the add page of tableB join both tables on the Edit SQL query tab, then add fields to the add page on the Choose fields tab and set up it as readonly on the "Edit as" settings dialog on theVisual Editor tab.

If you want to create different add pages for each user group create custom view on the Datasource tables tab:

http://www.xlinesoft.com/phprunner/docs/list_page_options.htm