3 Replies Latest reply on Apr 19, 2017 11:42 AM by philmodjunk

    Layout interface for creating subtask outlines


      Okay, so I have a task list that I'm trying to create. I've got a pretty good handle on how tasks are implemented in Filemaker thanks to the starter solution, but there is a feature I didn't see in it that I would like to implement. Subtasks.


      I looked around at some other questions people have asked, and it looks like you can give any task a (theoretically) infinite number of subtasks by creating a field for child tasks that stores the parent task's primary key (which would create a one-to-many relationship within the same table.) Since this is in the same table, each subtask could have its own subtasks and so on.


      I think I understand how this is supposed to work on the back-end. But I'm not quite sure how someone would display this on the front-end for a user so that they could enter a task, then a subtask, then a subtask of the subtask (etc.) each with its own due date, description, and other information, and view it all as an outline (kind of like how Todoist does it.)


      Basically it would display like this:


      • Task 1
        • Subtask 1
          • Sub-Sub Task 1
          • Sub-Sub Task 2
            • Sub-Sub-Sub Task 1
            • Sub-Sub-Sub Task 2
          • Sub-Sub Task 3
        • Subtask 2
          • Sub-Sub Task 1
        • Subtask 3
      • Task 2
        • Subtask 1


      etc, with the ability to enter new sub-tasks, mark them completed, or delete them right there on the screen.


      If there was a limited number of levels to a subtask, then this could probably be achieved with a few portals right next to each other, with filters based on the active record in the adjacent portal. If that's the best way to go about this, then I'll do that. I don't particularly like doing it that way because it places a limit on how far you can drill down (I really like breaking large tasks down into smaller ones).


      Can what I'm describing be done, or do I have to use the adjacent portals method?

        • 1. Re: Layout interface for creating subtask outlines

          Hmmm, I'm wondering if you can use a calculation field that identifies the "level" of indent as a number. If so, a calculation field could return that number of tab characters followed by the task name and paragraph formatting in the Inspector could set tab stops to control the level of indent.


          any text that then has to wrap to the next line might produce some messy results though....

          • 2. Re: Layout interface for creating subtask outlines

            I'll probably use a scripted button for creating a subtask. In that case, the indent number could be calculated by adding 1 to the parent task's indent number.


            The tricky part, I think, will be sorting records appropriately, making sure that deleting a parent record deletes child records (or marks them complete), and finding a way to collapse subtasks - probably a combination of button scripts and portal filters.


            I'll be able to test this when I get home from work.

            • 3. Re: Layout interface for creating subtask outlines

              with care, a cascading delete might be set up on the relationships graph.


              Or use a delete button or custom menu delete option to run a script that both deletes the record and also manages what needs to happen to related tasks/substasks.


              Here's a calculation that could generate a string of tab characters based on a field called "indentnumber"


              Substitute ( 10^IndentNumber - 1 ; 9 ; Char ( 9 ) ) & " " & TaskTitleFieldHere