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.

Clock out script efficiency

Featured Replies

This is my first, what I would call, complex script and was hoping to get some feedback on its' efficiency. It is used in a timeclock solution for a filemaker GO "app." It is intended to perform the following actions (same order as in script attached):

 

1) Verify all records from that date are marked as complete. (eg: Cases::Complete=1)

 

2) If okay, go to time clock, sort based on "time out," making sure the most recent record is empty. If not empty-->display error, unsort

 

3) If empty, time out as current time

 

4) Email copy of entire DB.

 

It performs all of these actions without error, but I'm sure there's a way to make it better. Thanks in advance for the input.

 

Clockout.tiff

  1. Halt Script : You should only use this step if it's absolutely necessary. I don't think I ever use it anymore - I use Exit Script, with a result which the calling script can test for to determine if the sub-script contained an error
  2. Perform Quick Find : this is ambiguous I think it should be replaced with something like the following (I'm partially guessing what your intention was, so these steps will need to be adjusted as needed)

    Enter Find Mode
    Set Field[Cases::Date ; Get( CurrentDate )]
    New Record/Request
    Set Field[Cases::Complete ; True]
    Set Error Capture[On]
    Perform Find
    Set Error Capture[Off]
    # probably want to test if records were found here

After that I'm not quite sure what to say because I don't quite understand what's going on. If you adjusted based on my recommendations above, then re-posted, I might have more feedback.

 

Personally, I would prefer this setup rather than using the first 'Else' section:

Show Custom Dialog...
If[/* Cancel */ Get ( LastMessageChoice ) = 2]
    Exit Script
End If
# now perform your find, outside of the above 'If'
  • Author
  1. Halt Script : You should only use this step if it's absolutely necessary. I don't think I ever use it anymore - I use Exit Script, with a result which the calling script can test for to determine if the sub-script contained an error
  2. Perform Quick Find : this is ambiguous I think it should be replaced with something like the following (I'm partially guessing what your intention was, so these steps will need to be adjusted as needed

 

To answer #2- The purpose of the DB is to collect data on case starts. When the observer arrives in the unit, they input all their cases at once. As delays etc occur, they modify the record as needed, but when finished, they check the "complete" box. When this is checked, it throws a 1 into the complete field. The purpose of the step in question is to check only that day/users records to make sure that they hit complete for every record. If not, it throws them back to a list that shows the incomplete.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.