3 Replies Latest reply on Jun 15, 2009 8:17 AM by TSGal

    need help with Automated action script



      need help with Automated action script


      hello everyone.

      I have a small care home and for that i have made a database of staff and residents.

      In the employees table I have a list of employees with different qualifications and based on their performance they each have a performance score of 5 to 25.

      I am trying to set up and automated Roster so that 4 employees be assigned to a shift, 2 with a performance score of 10 or above and 2 with PS of less than 10. There are 3 different type of shifts in a day Morning(M) Afternoon (A) and Night (N)

      I have assigned a script to each day of the rote field so taht on entre script searches for the staff who have score of more than 10 and then set field to assign a shift to that employee. but so far it is not working properly as I wanted it to, can somone please direct me to a proper way of doing this as my little knowledge of FMP 10 is obviously not enough to make the script work.


      Thank you all for your help on this matter.

        • 1. Re: need help with Automated action script



          Thank you for your post.


          After reading your post, there are still a lot of unknown factors.  For instance, it is easy to search for employees with a performance score of 10 or above, as well as searching for employees with a performance of less than 10.  However, how do you know which shift to assign an employee.  For example, if I assigned an employee to a Night shift one day, and the next day to the Morning shift, that might be 16 straight hours of working, and I assume you don't want this to occur.  What other criteria is used to put employees into a shift?



          FileMaker, Inc. 

          • 2. Re: need help with Automated action script

            Thank you for your quick reply,

            other criteria would be

            limiting the hours of work to 37.5 per week

            Awarding two day off after each stretch of 5 Morning or afternoon shift

            Awarding one day off per each night duty and not to have tretch of 4 nighs in a row

            How ever, having said that, Staff will have access to a request layout where they are able to request the shifts they want and script sholud check the requests for consistancy and fill the empty slots( where no request for shifts have been made).


            I am very new to FM and tried to make script for this but so far with my limited knowledge, it appears like an impossible task unless you could point me to the correct path. Any help would be gratefully appreciated.


            Thank you

            • 3. Re: need help with Automated action script



              Thank you for the additional information.


              For each week, subtract the hours requested from 37.5, and if greater, then display a message.


              You'll need to determine what constitutes a stretch of 5 morning or afternoon shifts.  That is, would Tuesday afternoon, Wednesday morning, Thursday morning, Friday afternoon and Saturday morning constitute 5 continuous days?


              If someone works 4 nights in a row, do they get four days off?  Can the person then work more days to not exceed 37.5?


              The best option right now is to take it one step at a time.  That is, work on the 37.5 hours until you are satisfied.  Then work in the next criteria until satisfied, and continue.


              Let me know if you are having difficulty with any of the scripts.



              FileMaker, Inc.