7 Replies Latest reply on Mar 18, 2015 8:59 AM by YilbberVargas

    Need Help creating two seperate scripts.

    YilbberVargas

      Title

      Need Help creating two seperate scripts.

      Post

      I need to generate two seperate scripts that do the following.

      The First one is I need a script that Pulls an Employee's Schedule based on the master schedule.

      The employees are identified in Two Locations, One field is called Lead, and the Other, Crew. (and a related Table is Driver)  The Table is named Schedule. The employees are in EMPLOYEE, and have Ids, EmployeeIni(initials), and a Lead and Driver tag (which is 0 for Off and 1 for on)

      I have Gloablfields set for various tasks (each named Global(Etc) (Date,name,filter,combine,etc)

      I know i have to create a dynamicly generated report, but it needs to be populated with split tables. (showing the various fields I created in Portal)

      I also need for it to toggle the employees as unavailable after they have been assigned to a show, so they do not show up as being available. This part is confusing for me as I do not see an automated way for this so far.

       

       

        • 1. Re: Need Help creating two seperate scripts.
          philmodjunk

          You'll need to describe the design of your database in much more detail before we can do much to assist you.

          • 2. Re: Need Help creating two seperate scripts.
            YilbberVargas

            https://drive.google.com/file/d/0B6nfOX5ls0ZpZVFBRGxMM1ZHc1E/view?usp=sharing

            This is a Link to my current scheme.

            I basically need every time schedule entries are made, they are compared to the outlist, which is called Availability, and everytime they are out, they have a return date, with events that are on the same day are time stamp-checked as well.

             

             

            • 3. Re: Need Help creating two seperate scripts.
              philmodjunk

              It's easier to read this way:

              • 4. Re: Need Help creating two seperate scripts.
                philmodjunk

                But it's really not enough to go on (but it helps).

                The First one is I need a script that Pulls an Employee's Schedule based on the master schedule.

                Where in the above data model would you find a "master schedule"? Where would the data be found for the employee's schedule?

                Is the "master schedule" all records found in the SCHEDULE table? Is the employee's schedule then the set of records in Schedule linked to that employee's record in Employee? The relationship between these two, BTW, does not look correct. The relationship seems to indicate that every schedule record shows every employee as both lead and crew instead of one or the other.

                And what do you mean by "pulls"? Presumably you are pulling up a found set of schedule records for that employee, if you fix the relationship and start from a layout based on Employee, Go to Related Records might be used to pull up that found set.

                • 5. Re: Need Help creating two seperate scripts.
                  YilbberVargas

                  Ok. Schedule Should be the Master Schedule

                  I know i messed up cause i was being forced to rewrite it because I at first used natural keys and i was made to change it.... but i think I will have to redo it again.

                   

                  Ideally: The Schedule Table Pulls a Lead, From a Lead List, who is an employee who has a lead flag,

                  The Schedule also has a Crew field, where each employee is referenced by initials (employeeINI)

                  The problem is that

                  1. Filter based on sort does NOT seem to work in a way that I can make it work (for example, I can't make it show me all employees who can lead without copying the employees table apparently)

                  2. I haven't been able to figure out how to parse the Crew field for each employee

                  So yes, I'm willing to take suggestions to fix this.

                  My original model seemed to work but was deemed to messy by the project manager, and He instead wants me to work with numerical Ids on every field. The problem becomes he doesn't want me using text fields as Unique indexes...

                  While many of the samples mentioned using 2 field join tables, I am not sure when to turn on or off two way or one way sharing.

                  And Apparently, Nothing I've done seems to create a proper 1:1 adding in the table.

                  Filemaker Always says there's 0' records in Table X no matter how i import records into a related table.

                   

                   

                  • 6. Re: Need Help creating two seperate scripts.
                    RickWhitelaw

                    "and He instead wants me to work with numerical Ids on every field."

                     

                    Don't you mean unique numerical id on every TABLE? Every record in a  parent table should indeed have a unique id (Primary Key) either by using an auto entered serial or by Get(uuid). Child tables then inherit this id In a field usually known as Foreign Key.If this is news to you and your project manager had to point this out to you then you have some studying to do.

                    "Natural Keys" generally refers to the practice of using data like names or manually entered product numbers etc. as Primary Key. This is always a bad idea.

                    All  that said, good luck with your project!

                    • 7. Re: Need Help creating two seperate scripts.
                      YilbberVargas

                      i had taken out to much information from the schedule to be usable, but i am in the process of fixing it, I found out elswhere how Table occurences are going to help me fix alot of issues i was having with filtering (such as creating multiple occurances of employee and omitting the ones i don't want for both lead and Drivers and Staff.