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.

Field Validation against a global field

Featured Replies

In our legacy system (currently FM 12), I set a global date field "Record Lock Date" which is the period close date from a financial perspective. Users cannot create timesheets with dates prior to the Record Lock Date (because they will have already been invoiced to clients at that point). Validation for Date field in Timesheet table looks like this with CAT being me: 
If (Get ( AccountName ) = "CAT" ; 1 ; (Date  >  Globals::Record Lock Date) )

Monthly, when we move to a new billing period, I close the file on the server and log in directly (without sharing), and I manually update that Globals::Record Lock Date field.

I'm designing a new system in FM 14, and I'm trying to figure out if there is a way for this date to be set without kicking everyone out of the file, closing the file, opening directly/unshared, making the global field change, and then logging out to open the file on the server again.

Currently I'm the only person with admin rights on the server to log in to the Admin Console, and corporate IT does not want to expand that, so it's something I have to be available to do every month at a certain time, regardless of other commitments, vacations, etc. I'd like someone with a certain privilege set to be able to update that field without needing to access the Admin Console to close the file and remove all users.

 

Write the value into a startup script, and set it when users logon.

Then you only need to update the script each month.

Create a table, call it Prefs or Admin or something and give it appropriate permissions. Create a Lock Date field. Create a single record in that table.

Create a script that runs at startup -- in FileMaker 14 it's the OnFirstWindowOpen script trigger under File Options -- and it would just go to the Prefs layout and set the Global Lock Date to the Prefs Lock date.

Or you could forget the global field and just trigger a validation script against the Prefs fields, e.g. via ExecuteSQL.

  • Author

I guess I left out some detail:  I initially wrote a script to trigger on first window open which sets the global lock date from a field in an Admin table. However, I realized that anyone already logged in at the time that the date is updated would still be able to enter and edit records based on the prior lock date until they logged out and back in to set their global field.

Is there a way for the billing administrator to "kick out" users without her having access directly to the Admin Console? This date is needs to be updated around 10 am, when we've given everyone a "last chance to finish your timesheets for the month" warning, but users are often still logged in during this time.

1. As Fitch already noted, you can validate against the "real" field directly.

2. You could have a script triggered on validating the field (IMHO, you should have that anyway, since Filemaker's built-in validation error messages are not exactly user-friendly).

3. Is there not a method in this madness that you could use for validating by a calculation?

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.