Jump to content

Use of Portal on Unrelated Table on Main Menu


John Kostenbader
 Share

This topic is 2324 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I've been thinking about this problem for some time now and I can't seen to wrap my head around a solution. I have a standard employee database that of course keeps employee data and in a related table "comments" about that employee. When I put an email out to all my employees I add that as a record in the comments table. There is a many-to-many relationship between "employees" and "comments" because each employee could have many comments and each single comment could apply (potentially) to more than one employee. The comments table has a "category" field which I use to detail whether its a public comment ("hey...everybody clean the coffee pot after your done") or a more private comment about their work performance. 

Anyway...all that background leads up to a feature I'd like to add to the application. I would like to add a "recent comments" portal to the main menu of the application. The idea being that each time they open the app they have the top 10 or so recent "public" comments they can reference. The technical issue is the main menu layout is not based on a table. Its mainly navigational in nature and does not store any data. Of course when you go to add a portal it wants some sort of table to reference. There does not seem to be a way to add a portal and assign data within a script so I'm wondering if anybody has run into a similar problem and how they might have approached solving it. One thought I had (although its implementation is incomplete in my head) is I can capture the username as the employee signs in and that could be used to identify the employee, which in turn bears a relationship to comments. 

Thanks in advance.

Link to comment
Share on other sites

I cannot figure out from your description if you have actually implemented a many-to-many relationship between Employees and Comments, and if so, how.

 

4 hours ago, John Kostenbader said:

The technical issue is the main menu layout is not based on a table.

That's not possible. A functioning layout must be associated with a valid table occurrence. You could use a sort of "global" table for a "dashboard" type of layout  - but that would work only for displaying data, not modifying it in any way. And yes, you would have to populate a global field in this table with the current user's account name or id in order to enable a relationship that shows only records related to them. But then you say you want the portal to display recent "public" comments; wouldn't these be the same for everyone?

Link to comment
Share on other sites

Yes...I may have not described this correctly. There is a many-to-many relationship between employees and comments via a join_EmployeeComment table and your right, I wrote this post without actually looking at the underlying structure of the main menu and it is connected to a "preferences" table (sorry that should have been correct the first time). I have a single occurrence of the "preferences" table in the relationship graph but it is not in any way connected to employees or comments. I guess that's the technical issue I can't wrap my head around. How can I make a meaningful connection between where there is no real related data

John

Link to comment
Share on other sites

19 hours ago, John Kostenbader said:

How can I make a meaningful connection between where there is no real related data

If you want to show the data as records (i.e. in a portal), then you must have a relationship.

 

Edited by comment
Link to comment
Share on other sites

This topic is 2324 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.