7 Replies Latest reply on Jan 28, 2014 10:16 PM by philmodjunk

    Loop through sub summary only



      Loop through sub summary only


           Hello. I've created a fairly basic checklist in filemaker broken down into chunks that appear in subsummaryies. I currently have a script that will mark all the tasks as complete or empty, but I'm looking for a way to do it for just one sub summary. Currently I'm just using a loop with a go to next record step set to exit after the last record. Any ideas for limiting it to the section currently selected?

        • 1. Re: Loop through sub summary only

               Sounds like you need  a related table where you have one record for each sub summary group. Then setting a status as "completed" would only need set a field in a single record of this related table.

          • 2. Re: Loop through sub summary only

                 I still want each task to individually be marked complete though. I just want to be able to quickly mark all in the category at once if need be. 

            • 3. Re: Loop through sub summary only

                   And that is why I am suggesting that you use a related table for this. Then clicking a single check box for a field defined in the related table "marks all in the category" as all are linked to the same common record.

              • 4. Re: Loop through sub summary only

                     Forgive me, I don't understand how this would work. If you put a field in the category in the related table for marking them as complete - then the complete checkbox in the individual records for the task would have to be a calculation that looks at this field - therefore making it impossible to check them individually - unless you make two checkbox fields for the individual tasks - one that the user controls and one that the category field controls and then you hide them based on if the category complete checkbox is complete or not. That seems overly complicated. What am I missing?


                     Just for a visual here's essentially what I want. The only thing I don't have right now is the Mark All for the Categories. The database is set up so that the categories are contained in a different table and related to the tasks. The global mark all script works on a loop that loops through all the tasks.

                     Mark All: Complete Empty

                     Category 1     Mark All: Complete   Empty

                       x    Task 1

                       x    Task 2

                       x    Task 3

                     Category 2      Mark All: Complete    Empty

                        x  Task 1

                        x  Task 2

                        x  Task 3

                • 5. Re: Loop through sub summary only

                       The need to check them off individually is not specified in your original post. That's new information that changes the situation.

                       Your looping script could be modified to exit the loop when the value in Category changes. You set a variable to the Category just before you start your loop and then compare the category of the current record to that variable in an Exit Loop If step that exits the loop if the values are not equal.

                       Or you could still use the related table option, but the implementation would be more sophisticated than I originally described.

                       Clicking a button next to each task would set or delete the task record's ID from a return separated list of such ID's in the category table. To select all tasks as completed, your script uses the List function to set the field to a list of all related ID's. A conditionally formatted layout object--such as An X added as layout text to the layout can change appearance when a task is completed and thus simulate the behavior of a check box field. The main advantage to this approach is avoiding the use of a loop.

                       If you are interested in that approach and want to know more let me know.

                  • 6. Re: Loop through sub summary only

                         Sorry that's what I was trying to describe all along. I discovered the set variable command and used the 1st approach you list above. Sorry for the confusion and thanks for the help.

                    • 7. Re: Loop through sub summary only

                           Hey no problem and no real confusion. I was just explaining why I was changing my initial suggestion.