This topic is locked

Dashboard Dispay single record

9/17/2014 4:05:07 PM
PHPRunner General questions
K
kenny_robb author

I may be being a bit slow but I want to display a dashboard that displays a single record based on the logged in user in one panel.

and then related records from another table in the other panels
Is this done through and event or some other way....
Any assistance would be greatly appreciated
Thanks

Admin 9/17/2014

First create a dashboard as normal adding main table and multiple details tables. Then turn on 'Users can see and edit their own data only' mode for the main table. This is it.

K
kenny_robb author 9/17/2014

Thanks for that, I had not thought of that approach
however Is there a way to programmatically control what is displayed because some of the related data is linked by other fields.
Kenny

Admin 9/17/2014

Not sure I understand what exactly needs to be controlled programmatically. Could you provide some scenarios?

K
kenny_robb author 9/17/2014



Not sure I understand what exactly needs to be controlled programmatically. Could you provide some scenarios?


This is all related to my Joomla project. I login to Joomla and hence set a number of session vriables etc etc (previous problem now fixed, thanks)
I have a project that uses data from Joomla and combines it with other data but basically I want to be able to use my login details to display a single record from the database.
I then have some other different tables which have a uid that links multiple records back to the user record.
Simply put
What I want is something called my dashboard that brings up my user record on the left panel and then brings up the multiple linked records on the two right hand panels.
Other things I have tried.
I created a custom view of the data and created an event using a where clause to pull my record but when I add that custom view into my dashboard I get the first record not my record.

I have tried creating parent child relationships which again work in the rest of the application but do not work in the dashboard.
Am I doing something wrong or have I missed something important?

Admin 9/17/2014

I don't understand how is that different from solution that I have suggested. Display a dashboard with single master table and multiple details tables. If you need to limit data in the main table - use 'Users can see and edit their own data only' mode for the main table.

Admin 9/18/2014

Probably you can post some screenshots that would explain what exactly you doing and what results you getting so we can understand the issue better. Looks like a fairly straightforward setup to me, I must be missing something.

K
kenny_robb author 9/18/2014



Probably you can post some screenshots that would explain what exactly you doing and what results you getting so we can understand the issue better. Looks like a fairly straightforward setup to me, I must be missing something.


ok here goes.
I have a joomla site with all the tables that go in that xx_users (contains all the user details) xx_session (session data)I used these to do the integration.
When someone registers I have a proc that takes some of their details from the joomla xx_users table and put it into a xx_user_details table which I will add more data to through the phprunner app I have built.
The app is integrated into joomla so it looks like it is part of the joomla site.
As part of the normal day to day things that happen on the site the user will do actions that will mean that two tables, history and training get updated with the uid of the user and the event/training they have completed.
I want to build a dashboard that has the user details (single record) on one side and all the history (many records) and training (many records) on the other side.
I thought it would be as simple as setup a parent child relationship between the user details and the other two and in fact that works well in the ordinary application (non dashboard) giving me what I would expect with each record having the child records present.
I used an event to filter on the current user and that worked (still in the traditional PHPrunner app)
I then took the user details (set it up as a single record) and added it to a dashboard and then added the history and training (both as data grids) to the dashboard as well.
The result was I got the first record in the user details and everything from the history and training tables.
Will try and do some screenshots

Admin 9/18/2014

Yes, I need to see what exactly you doing in PHPRunner, what results you getting and what needs to be different. Without screenshots it just doesn't make much sense.

K
kenny_robb author 9/19/2014



Yes, I need to see what exactly you doing in PHPRunner, what results you getting and what needs to be different. Without screenshots it just doesn't make much sense.


PM Sent with links to screenshots

Admin 9/23/2014

Just in case I'll try to elaborate it here. Here is what you need to do to link two or more tables as master details in dashboard.

  1. Link two tables as Master-Details in PHPRunner.
  2. Add the same Master table twice to dashboard choosing 'Grid' option first time and 'Details' option second time.
  3. (optional) Turn on 'Users can see and edit their own data only' mode for the master table.

K
kenny_robb author 9/23/2014



Just in case I'll try to elaborate it here. Here is what you need to do to link two or more tables as master details in dashboard.

  1. Link two tables as Master-Details in PHPRunner.
  2. Add the same Master table twice to dashboard choosing 'Grid' option first time and 'Details' option second time.
  3. (optional) Turn on 'Users can see and edit their own data only' mode for the master table.


I will give it a try and see what happens