1 2 Previous Next 19 Replies Latest reply on Sep 21, 2009 3:07 PM by philmodjunk

    newbie looking for a way around nested portals

    amixer

      Title

      newbie looking for a way around nested portals

      Post

      I'm aware that I can't nest portals, but I have a set of related databases in which the first database contains information about a job and is related to a second database that consists of tasks performed on that job.  So I'm viewing the Task database in a portal in the Job database.  Now I would like to be able to relate a sub-task database to my task database, so that each task can consist of a varying number of subtasks depending on the day, and I would like to be able to view these subtasks in the same portal as I'm viewing the current Task.  The classic description of a nested portal which doesn't work.  I'm know this question has been answered before, but on reading the answers, I couldn't understand how to implement them in a way that would work for me.  Any suggestions?

       

      Just to make myself more clear

       

      Job #1

                 Task#1

                         sub Task 1

                         sub Task 2

                 Task # 2

                         subTask 1

                  Task # 3
                         sub Task 1

       

      Job # 2  etc.

      Job and task are related by Job #.  I want to have an unlimited number of subtasks for each task, which is why I don't want to use repeating fields.  Again, I'm sure this is relatively easy but can someone point me in the right direction please? 

        • 1. Re: newbie looking for a way around nested portals
          comment_1
            

          If you make the portal look into the SubTasks table, you could have it show:

           

           Task 1  SubTask 1

           Task 1  SubTask 2

           Task 1  SubTask 3

           Task 2  SubTask 1

           Task 2  SubTask 2

           

           

          With some conditional formatting, this could become:

           

           Task 1  SubTask 1

           Task 1  SubTask 2

           Task 1  SubTask 3

           Task 2  SubTask 1

           Task 2  SubTask 2

           

           

          • 2. Re: newbie looking for a way around nested portals
            amixer
               That's an interesting idea and I'll play with it today when I get a chance, but I'm not sure how I would set up the relationship properly from the Job database to the subtask database in order to display the subtasks in a portal in the Job Database.  Food for thought on my part.  Is the conditional formatting you're talking about part of the portal setup?
            • 3. Re: newbie looking for a way around nested portals
              comment_1
                

              If your relationships are set up as:

               

              Jobs -< Tasks -< Subtasks

               

              then all you need to do is place a portal to  Subtasks on a layout of Jobs.

              • 4. Re: newbie looking for a way around nested portals
                FentonJones
                  
                It is possible to do this, but to show it as indented, etc., a "hierarchy," is not so easy. I would have to use an example file created by someone smarter. Also, the fact that you want an "unlimited" number of subtasks implies "a lot" of them, which don't lend themselves well to portal viewing. 

                 

                Another way (requires FileMaker 10) to do this is to give up on the portals, and use a separate layout, a list view of the subtasks table. You can always show data from the related tables "above" a level. You can show Subsummary parts in Browse mode. If you have a small script to Sort the records, you can set a Script Trigger to run OnLayoutLoad, and another OnModeEnter (• Browse) (so it resorts after a Find). This gives you a hierarchal view, with indents (optionally different colors) of unlimited length. Data can be entered, buttons & scripts work. You can isolate or expand the data being shown, via Finds.

                 

                Yes, it requires going to another layout. This could optionally be a New Window, resized and located wherever you wanted. That works smoothly on a Mac (not so much on a PC with maximized windows, but workable). It requires some handling of the window(s). But I think this technique is going to be common in the future, instead of large portals.

                • 5. Re: newbie looking for a way around nested portals
                  amixer
                    

                  well "unlimited" is a bit of an exaggeration, I guess I just don't want to be boxed in by using a repeating field of x cells, and then run into the task that requires x+1 cells.  By using a related database where each subtask is a record, I avoid that issue.  As to showing the subtasks in a portal on a layout in Jobs, the problem with this is that the subtask belongs with the task.  Displaying a list of subtasks without reference to which task they belong to doesn't seem like an ideal layout for what I want to be able to access from one page. 

                       When you're talking about a separate layout with a list view of the subtasks table, am I treating it a bit like a report where I have a Task as a sub summary field and subtasks belong to each task?  Unfortunately I'm working in FMP 7 still, so those script triggers don't exist for me yet.  Guess I may have to upgrade soon.  I'll play with the list idea too as I understand it.  Thanks for the suggestions and if there are any more I'm all ears. . . 

                  • 6. Re: newbie looking for a way around nested portals
                    philmodjunk
                      

                    Comment's method identifies the task in column 1 and sorts the portal entries to group them by task. That look's like it'll do what you need.

                     

                    Some developers have also used two portals. Portal 1 would list tasks and Portal 2 would list sub tasks. It's possible to design the interface so that clicking a listed task highlights it and set's the sub task portal to display the matching sub tasks.

                    • 7. Re: newbie looking for a way around nested portals
                      amixer
                         Does this two portal method require FM 10?
                      • 8. Re: newbie looking for a way around nested portals
                        philmodjunk
                          

                        No, I've used a version of this for as long as we've been able to use portals which goes back to version 3. If you have conditional formatting in your version, that makes it a little easier, but you can highlight a portal row in older versions just by using a different, more complicated method.

                         

                        Before you dive into this approach, it might help to explain more on why Comment's approach doesn't appeal to you. If you can get that to work for you, it's much simpler.

                         

                        If you explain that, it may turn out he or I can show you how to use that method instead of two portals.

                        • 9. Re: newbie looking for a way around nested portals
                          comment_1
                            

                          amixer wrote:

                          Unfortunately I'm working in FMP 7 still


                          Then my suggestion won't work for you - it requires at least version 8. The two portals are your best alternative, IMHO. Just place a button in the portal to Tasks that sets a global gTaskID field to Tasks::TaskID, and define a new relationship between Jobs and a new occurrence of SubTasks as:

                           

                          Jobs::gTaskID = SubTasks 2::TaskID

                           

                          A portal to SubTasks 2 will show the subtasks of the selected task.


                          • 10. Re: newbie looking for a way around nested portals
                            amixer
                               I think I'm heading toward the dual portal approach because I don't want to just view data, I want to enter data in the same layout, and I think comment's approach only takes care of displaying the data, but does not allow entry correct?  Even if display ends up being all I need I'm still not sure where the conditional formatting is applied.  Is this a script? Is this part of the Portal's sort definition? I'm having a hard time visualizing how it would work.
                            • 11. Re: newbie looking for a way around nested portals
                              philmodjunk
                                

                              I suggest following Comment's directions to get your two portals working the way you like first.

                               

                              Then, if you want to show the current task clicked in the portal to be highlighted, we can add that feature later.

                              • 12. Re: newbie looking for a way around nested portals
                                amixer
                                  

                                Alright thanks for the help everyone.  I'm going to try to implement Comment's latest suggestion.  I have some digesting to do. Back when I either get it working or get stumped!

                                thanks

                                -Andrew

                                • 13. Re: newbie looking for a way around nested portals
                                  Claudia
                                     Do you have an example you could share with me on how this is done?  It would be greatly appreciated.
                                  • 14. Re: newbie looking for a way around nested portals
                                    philmodjunk
                                      

                                    Which this?

                                     

                                    We discussed several options/techniques in this thread and am not sure which one you are asking about.

                                    1 2 Previous Next