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

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

Recommended Posts

Posted

I have an auto-calculate field that uses a global field in it's calculation. If I change the global fields (Server Address and Path), I would like to have the autocalc field (photopath) recalculate for all records with the new global field values. What is the best way to accomplish this, a script?

 

The purpose is to have global fields identify the location of the images so that if I have to move the database to a new computer or upload to a server, I can just update those global fields with the new server address and image folder path so all the container fields have the proper reference path.

 

I attached a mock database.

Any suggestions?

 

autocalcfmp12.zip

Posted

I'm not sure why you want to set the path to the global field, and not just use the global field itself.  One thing to note about global fields is that they behave differently if the file is hosted by Filemaker Server rather than be hosted with "Network Sharing" directly from a client machine with FM Pro. On server, the globals are specific to each client, so different users can set the global field to their own value and not effect other users. 

 

An approach that you might consider is having a separate table for "preferences".  On this table define a text field called 'path'.  Create only one record on this table and join it to other tables with the "all records" operator (X).  On your Photos table, define 'photopath' as a calculation field which references 'path' on the Preferences table (i.e. do not use an auto-enter text field).

Posted

One problem, when I uploaded my database to the server. I have one table with one record with a field showing the root path to my image files. When I change the GlobalRootPath (path to my images folder), the image path (calculation field = GlobalRootPath & PhotoSerialNo) does not recalculate. I thought calculation fields always recalculate?

Posted

One thing to note about global fields is that they behave differently if the file is hosted by Filemaker Server rather than be hosted with "Network Sharing" directly from a client machine with FM Pro.

 

What Matthew said: globals calculate differently when hosted.

 

You need a preferences table to store the file path, not a global field.

Posted

Any chance I can get a link describing the creation of this reference table? Sounds pretty straight forward but I'm not sure how to "join it to other tables with the "all records" operator (X)". I searched the Forums and Googled it, not much is turning up.

 

Thanks.

Posted

Yes, the relationship to a preferences table is very simple. You can create additional occurrences of the prefs table, if necessary, to make direct links to other data tables in your relationship graph. 

 

More tricky, is getting the correct path to your photo collection. Included on this example file is a button (Get Mac Path) that lets you browse to a photo in your repository and then sets the corresponding path in the preferences table. 

 

PathPrefs.fmp12.zip

This topic is 4196 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.