4 Replies Latest reply on Nov 5, 2015 5:16 PM by shelton356

    how do i create a script to find a certain group of students

    shelton356

      On the layout for little kids i would like to just find the students that are in grade 3, do i need a script for that. I have not uploaded those students yet but just working on the layout and trying to get this ready to import data. Also, what would be the best way to create a layout to store school records. There will be 30 schools where i need to store a pdf file for each school. Thanks in advance. Any help would be appreciated.

        • 1. Re: how do i create a script to find a certain group of students
          erolst

          shelton356 wrote:

          On the layout for little kids i would like to just find the students that are in grade 3, do i need a script for that.

           

          Not necessarily, you could search for them manually; a script wouzld make this more convenient, though.

           

          shelton356 wrote:

          Also, what would be the best way to create a layout to store school records. There will be 30 schools where i need to store a pdf file for each school.

           

          Create a School table; add a container field into which to insert the PDF.

           

          If you foresee the need for multiple PDFs per school, or want to add ODFs for other entities (e.g. Students), create a new table for PDFs only,that you can relate to either or both of the other tables (and any tables you might create later).

          • 2. Re: how do i create a script to find a certain group of students

            Thank you for you help. So on several of the tabs like SDSU kids, SDSU Preteens those are correct, they wanted to me to add the group little kids this year because they are testing those students now. I totally forgot how i did the SDSU kids and SDSU Preteens, in regards to writing the script. Can you give me and direction on how to add the script, do i go to manage script, add new script and this is where i'm getting lost also. Also, if i click on SDSU kids then student list, it shows just the SDSU kids, which is correct, so how do i link Little kids to that list when i click on SDSU Little Kids and then click on the student list it just show the SDSU Little Kids. Thank you again. I do understand the table for the container. Do i need to link this to something in my relationship section?

            • 3. Re: how do i create a script to find a certain group of students
              erolst

              Hi Shelton –

               

              your question re script is a bit difficult to answer because I don't know your current setup, or how the students are flagged to belong to a specific group. Do you just calculate this by current age, or does each student have a group marker/ID? And it would be helpful to see your current script(s).

               

              Guest wrote:

              I do understand the table for the container. Do i need to link this to something in my relationship section?

              Yes, you need to; this is the essence of a relational database system. Start with making sure that you always create/have a unique, auto-entered, meaningless ID field (the primary key) in all your tables; then add a foreign key (the counterpart, so to speak) to your Container table.

               

              Relate

              Schools::id = Containers::id_school

              and set the School side to "Allow creation of related records …”. Place a container onto a School layout with the container field in it, and you can add a new record simply by inserting a PDF into the container field. If you like, add other fields to the Container table (description, title, date, etc. – whatever you need).

               

              Does that answer help … ? If not, you may want to re-read the Help (or the FileMaker Training series, or a book) on relational database design in FileMaker.

              • 4. Re: how do i create a script to find a certain group of students
                shelton356

                I'm still trying to get the containers right, i just need to be able to upload documents to containers. The way i will do the layout is to have each school with a container so that i can drop their reports into that containers. Can you check what i have so far and see if the relationship is correct. You mentioned the below to me and i think i have this set up this way. When you say schools::id would that be the primary key and the containers will be the foreign key? f you can assist i would love it. Thank you.Screen Shot 2015-11-05 at 5.12.18 PM.png


                Screen Shot 2015-11-05 at 5.12.23 PM.png Screen Shot 2015-11-05 at 5.13.30 PM.png