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.

Establish Company Owner Record

Featured Replies

How do you establish the "Owner" record in the CompaniesTable?

CompaniesTable contains Owner, Clients and Vendors records.

The database system needs to know which record from CompaniesTable is the operating Owner.

So… I have accomplished this using a SystemTable.

DEMO file and screen shots attached to help illustrate question.

I just wanted to get a second opinion on this structure. Good or bad and needs work?

The SystemTable is a "one record" table. SystemTable has a CompanyOwnerID field to set the Owner in.

ALL other tables, ProjectsTable for example, have a hard calculated field that simply = 1001, the SystemID.

This field connects the ProjectsTable to the SystemTable and in return establishes a link to Owner Record which.

The hard calculated SystemID field in ALL parent tables; should this actually be a "calculation" field? It is really not calculating anything per say, it just needs to equal the one-record SystemID, always and forever. Technically is is calculating, but you see my point right? lol

Also, should the SystemsTable be a one-record table, or should it be a NO record table and simply store global values?

Some developers have a separate table just for the "owner" record. A one-record table. But this will not work in my particular case, as well as others if I understand correctly.

THANKS A BILLION for any help on this topic! :)

post-80154-0-13070900-1336078817_thumb.p

post-80154-0-51033400-1336078830_thumb.p

owner.fp7.zip

Global values cannot be "stored" easily. A one record table is what I use.

  • Author

Great, so the one-record SystemsTable I will continue to use.

Thanks Vaughan!

I also have a "system" table that stores stuff that the solution needs to work with, like icons, images etc. Generally the user's don't get access to this, which is why I have a separate table that they can see edit.

  • Author

Vaughan! Thanks!

Yes, in my solution it is the same. The one-record SystemTable is only accessible by Admin and stores like you mentioned icons, images, etc.

Generally speaking; So is it safe to say, you would link the SystemTable via relationship to ea. TOG? Or in other words link the SystemTable to the "main" parent table of the TOG?

On establishing a link between SystemTable and MainParentTable in TOG; The manner in which I mentioned at the beginning of this topic, is it a best practice technique?

or is there a better way to do this?

Thank everyone for your time and help on this topic! :hairy:

This is where global fields can be helpful: globals can be accessed from any context at any time, even completely unrelated. Many developers use a startup script to load the "normal" values into global fields, and then reference the global fields. This avoids TOs to the preferences table everywhere.

It does require that the startup script run before the solution works correctly, which can be a failure point.

  • Author

I do use globals for icons, images, misc. And yes, this makes it easy to access without a TO's everywhere.

BUT, practically EVERY TOG in the database needs to know which Company record is the "Owner" record.

So I'm thinking I will not have to relate every TO to the SystemTableOwner > CompanyTable, just the main TO in the TOG. Generally speaking.

Heres kinda how I'm reading all this...

So the SystemTable would be a one-record table with a SystemID.

All MainTables will have a hard calculation field that = SystemID, that would link to a SystemTable TO, which would relate to CompanyOwnerRecord.

The SystemTable would also have global fields for things like icons that could be accessed w/out a direct relationship. Would need a housekeeping script for this.

Am I following correctly?

All MainTables will have a hard calculation field that = SystemID, that would link to a SystemTable TO, which would relate to CompanyOwnerRecord.

That's 6-think.

Read up on the X-join operator, and rejoice.

  • Author

Yay! Rejoicing...

Thanks Vaughan!

From my read up, the x-join is a cartesian product: http://help.filemake...n-filemaker-pro

So I have attached a new demo file using the x-join and SCRAPING the unnecessary constant calculation SystemID_field.

Takes advantage of the x-join by using the already existing primary ID field in the tables.

So any opinions on this structure? Solid, good practice system?

Thanks for any feedback!

owner_demo.fp7.zip

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.