Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Relationship between global and nonglobal


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

Recommended Posts

Posted

I have a "Resources" table which pools all the global fields needed for a solution. I'm migrating to a multi-user server setting. Luckily, most of the globals are initialized and expected to "persist" only for the duration of a login session: they don't have to retain their values across sessions.

But there are a few that have to be able to be permanently changed (company logo, most recent batch number, etc.). What I did was

-- change all such "persistent" fields to be non-global

-- add a global calculation field g_One that's permanently set to 1.

-- add a nonglobal calculation field c_One that calculates to 1.

-- created a TO based on Resources called PersistentGlobals with the relationship Resources::g_One = PersistentGlobals::c_One.

I took care to ensure that there is always exactly one record in the Resources table.

For some reason, though, the results are unpredictable -- layouts that should show these persistent global fields (e.g. PersistentGlobals::last_batch_number) show nothing at all. And sometimes they do, although I don't know if that's a result of my diddling around behind the scenes.

Am I doing this right? And doesn't it matter that the global field (g_One) be on the left side of the relationship?

Something else I'm unclear about is: since g_One a global, it is always related to any layout. And g_One is one-half of the relationship to c_One, which lives on the PersistentGlobal record. Does that mean that fields on the the PersistentGlobal record are also related to any layout? Or should I declare a g_One field in every table from which I need to access PersistentGlobals, and a corresponding relationship? If that makes any sense.

Thanks,

Chap

Posted

1. You can use the cartesian 'X' join to a TO for all the places you would need to access this "preferences/persistent" data.

2. You can set a couple of global fields to the values of your persistent data. Now you can use the globals anywhere.

3. You can create global calcs to the value of the persistent data, and then use a field to trigger it. (Read posts on when global calcs recalc). Now you can use the globals anywhere.

Posted

All very nice suggestions. You missed one, though: to ensure being able to see the persistent data on a layout, be sure to set the text font to some color besides that of the background.

:P : ;)

But seriously, thanks for those ideas. Seems like a Cartesian join would be the easiest.

Posted

I would generally vote for option 2 as easiest to manage. Just set your globals at startup. You'll never need to clutter your graph with extra relationships, because globals can be accessed even from unrelated tables.

This topic is 6098 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
×
×
  • Create New...

Important Information

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