Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

  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'
Posted
  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.

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