12 Replies Latest reply on Jan 10, 2011 12:53 PM by Poacher

    How To show only related record in List View

    Poacher

      Title

      How To show only related record in List View

      Post

      Hello

      I have a simple question but I cannot find a solution.

      I have a table with projects and a table with tasks.

      I'm able to create the projects and add tasks to a project, but when I want to print it through a Table View, I even see all tasks in all projects or no tasks in no projects.

      A task is related to a single project as it describes the work which was done.

      I figured out to put a part in the header and the task part in the body of the view.

      even a join table did not give me the solution I want.

      Can someone help me further please...

        • 1. Re: How To show only related record in List View
          philmodjunk

          Note: Table View and List View are two different views. But either can be used for what you specify here.

          Option 1:

          Use a script initiated from the projects layout that performs a find that only finds the related task records.

          Set Variable [$ProjectID ; Value: Projects::ProjectID ]
          Go To Layout [Tasks]
          Enter Find Mode []
          Set Field [Tasks::ProjectID ; $ProjectID]
          Set Error Capture [on]
          Perform Find[]
          Sort [restore; no dialog] //optional, may not be needed

          Option 2:

          Use a script initiated from the projects layout that uses Go To Related Records (GTRR) to pull up the related tasks records in a found set.

          If [Not IsEmpty ( Tasks::ProjectID )]
             Go To Related Records [Show only related records; From Table: "Tasks" ; Using Layout: "Tasks"(Tasks)]
             Sort[Restore; no dialog]
          End If

          Note: if you don't sort the records,they will be either listed in creation order or the sort order specified for the relationship.

          • 2. Re: How To show only related record in List View
            Poacher

            Option 1 is working fine but it didn't work with the second option.

            Anyway, I can do it with the first choice and it is working smoothly.

            many thanks

            • 3. Re: How To show only related record in List View
              Poacher

              Now, I can view all the records for this Project.

              but now, I have another problem, I want to show in the header the title of the tasks.

              the description of the tasks are visible now but I need in the header the Title of the tasks with the position number.

              in the body are the description and the number of the task, this one works.

              I tried with a portal, but this shows only the first entry.

              my problem is, there could be a single task or 10 of them, so I need something dynamic?

              any ideas how to do this?

              • 4. Re: How To show only related record in List View
                philmodjunk

                In list view, you can just place fields from Projects in the header.

                In Table View, you can do the same, but you may have to go into layout setup..., click the views tab, click the properties button for Table view and specify "include header".

                • 5. Re: How To show only related record in List View
                  Poacher

                  is there any other way to show the date except the portal?

                  I need to show all the related records number and title in the header and in the body I need to show the number and text.

                  • 6. Re: How To show only related record in List View
                    philmodjunk

                    Portal? I haven't described using a portal at all.

                    A list or table view layout based on tasks with fields from Projects added to the header is what I have described here.

                    • 7. Re: How To show only related record in List View
                      Poacher

                      sorry, mistake from my side...

                      it works fine to show a field from another layout.

                      but I need to show a list of all tasks in the header too, just in much shorter way. and I know, it is possible to show several rows in a portal.

                      but in the portal I see only one row.

                      is there a way to show all the related records in the header in any way? I thought it could be done through a portal (wrong idea)

                      it should be something like this:

                      header: (or at least above the other text)

                      task1 task-title

                      task2 task2-title

                      task3 task3-title

                      in the body (or main task) this one works perfect with your help.

                      task1 "complete description of task1, which can be lots of text, might take half a page"

                      task2 "complete description of task1, which can be lots of text, might take half a page"
                      task3 "complete description of task1, which can be lots of text, might take half a page"

                      • 8. Re: How To show only related record in List View
                        philmodjunk

                        The problem is that you'd need a new relationship that matches tasks to tasks instead of Pojects to tasks as you are on Tasks, not Projects:

                        Tasks::ProjectID = TasksSameProject::ProjectID

                        Make TasksSameProject in Manage | Database | Relationship by selecting Tasks and then clicking the button with two green plus signs. (I really wish FileMaker had labeled those buttons!)

                        Then you can add a portal to TasksSamePRoject to list all the tasks in the header.

                        You might also be able to define a calculation field in Projects that uses the List function to list all the tasks. You could then include this text field in your reader, with a scroll bar if needed. This approach avoids the extra table occurrence ( TasksSameProject ).

                        • 9. Re: How To show only related record in List View
                          Poacher

                          you definitely saved my day, that works as expected with the new occurrence.

                          I'll go ahead until I face the next problem.

                          Lächelnd

                          • 10. Re: How To show only related record in List View
                            Poacher

                            Is there a way to print some fields on the last page only? like Title header does on the very first page, I need the opposite and print on the last page only.

                            I have a multi report now, and on the last page I want to print some information and salutations.

                            • 11. Re: How To show only related record in List View
                              philmodjunk

                              Use part setup, from the layouts menu to add a trailing grand summary part.

                              • 12. Re: How To show only related record in List View
                                Poacher

                                makes sense...

                                thanks once more