Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

showing related records

Featured Replies

Hi All,

I am trying to understand how one could show related records from one table, but that table's child related records beside it. I have simplified my example as follows:

I have the following entities:

Company

Employee

Computers

Each company has up to 5 employees. Each employee can have multiple computer records.

The administrator adds an employee and the computers related to that employee.

The employees are setup on tabs, each tab showing the first portal record or first employee for that company, second tab showing the second portal record or second employee, up to the fifth portal record (see example database)

The problem I have is how do I show the computers in a portal on the same tab as the employee information? I have attached an example of the database so far.

Any help would be greatly appreciated.

Constance

company_employees_computers.zip

This is probably not the right way to go. What happens when you add another employee? You probably should have a portal display your employees. Then when you click on one the the employees, it sets a global field with the EmployeeID. Then the relationship from this gSelectID field to a TO of the computers table will give you the portal that you are looking for.

  • Author

Without explaining our business too much, there will never be more than 5 employees (in my solution, the employee is a different entity that never exceeds 5).

I am not following your explanation on how I would use a global field to select the correct portal. Also, I don't want the user to have to click on a field to see the computers that the employee has assigned. I want them to show as soono as you go to the employee tab. Is there a way of setting up a relationship to show the information I require?

Edited by Guest

The only way to really do it is to make your portal wider and include your computer fields within the portal too. That will get you the first related computer to the person. See the mods to your file.

I'd have to agree with others even if you will only ever have 5 employees that solution doesn't seem very elegant or have the ability to grow/expand if the need ever does arise. One thing I've learned over the years of doing this is that when someone says "x will never happen" x happens.

company_employees_computers_mods.fp7.zip

Well you can create buttons that mimick the tabs. The real tabs can be hidden ( trick demonstrated on here ). Then the fake tab buttons can set the global field for the user ID. For the end user it will look seamless.

Also if you upgrade to FM10, then you can use Script triggers to set the field for you when they change the tabs without buttons.

You could replace the tabs by a portal to employees (arranged horizontally, if you like). Clicking in the portal would (a) set a global field to the employee's ID, and (:( go to the corresponding tab panel.

See a very rough sketch attached.

company_employees_computers.fp7.zip

  • Author

Thanks Comment,

This may work :o

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.