1 2 Previous Next 15 Replies Latest reply on Jun 27, 2011 10:38 AM by MadMacs

    Am I asking the impossible for a layout?

    MadMacs

      Title

      Am I asking the impossible for a layout?

      Post

      Most of my layouts (except reports) are based on just a Body section with a JPG image behind that provides a graphical appearance with fields, pictures buttons etc over laid. This is great and gives a good predictable result and is easy for non techy users. Most of my layouts are not for printing, only the reports where I use conventional headers and footers etc.  

      I have a table to manage tasks that is totally separate to my main database but created a field called CompanyID in my main and task tables - it serves no purpose other than to establish a relationship between the two so that I can have my tasks appearing in certain layouts in the main table. I tried using a portal to show tasks with limited success as the scripts I have written to filter views in the portal e.g., current outstanding tasks, tasks falling due in the next 7 days, tasks due by end of month, completed tasks etc don’t work with the portal because its just looking at the table. My scripts work exactly the way I want them to in a list layout. So I’ve given up with portals, even though they should be a more flexible solution. The problem with a list view report is that it mucks up the graphic appearance. I have taken my JPG background and cropped it into three, a header and footer and a narrow strip that sits behind the report fields in the list. All great where I have data, the strips seamlessly tile but once there is no more data lines, I have a huge yawning white gap until the footer section. If I use a wider strip, it just widens the gap between the lines of data. So my question is: is there someway of tiling the narrow JPG strip to ensure the white space to the footer is filled. Sorry this is a bit of a long winded question but any suggestions would be very helpful as on the face of it, I would have thought including a task portal should have been a simplest and most flexible solution.  I take it a layout within a layout is not possible - would have been great if you could have linked a portal to a specific layout so it presented data in a list view like a layout!

      Thanks   

        • 1. Re: Am I asking the impossible for a layout?
          philmodjunk

          If you'd care to describe what's not working for you with your filtered portals (Please indicate whether or not you are using FileMaker 11 ) we can probably help you get that working.

          With your specific question, try replacing your footer part with a trailing grand summary and see if you like the change. The trailing grand summary will "slide up" to be just below the last record in your list.

          • 2. Re: Am I asking the impossible for a layout?
            MadMacs

            Phil, the trailing grand summary works, I would have preferred a fixed size but its a compromise I can live with, so a very good suggestion, thank you.

            As to the portal, I'm using FMP10 and not 11. The idea is to have the portal show outstanding tasks on the "home" page when users first enter. Ideally I would like two other portals on the same page, the others to show clinical tasks related to patients based upon the main table and another to show outstanding referrals that have come in that need to be processed, which may well also be a different view from the main table. Having all three on the first page would give an instant view of what work has got to be done. I haven't done anything about these other two as I wanted to get the simplest to work first. The idea is to have a filtered view of just the outstanding tasks, as I say, I can do it in a layout list view by toggling scripts to show all tasks (completed or not), all outstanding, all outstanding due in next 7 days or due by the end of the month or tasks completed. I tried using the same script to show outstanding tasks and have this run as a OnObjectEnter script triggered by the portal but this didn't work. I have also tried this as a manual script but the portal still shows a mix of outstanding and completed tasks but not all of them. It shows the exact same tasks each time i go to the page so is masking some of them for some reason that I don't understand. Don't know if this helps?

            • 3. Re: Am I asking the impossible for a layout?
              aammondd

              You can use a table of Global fields with the associated keys to display different portals in a single layout.

              If your layout has a main record already you can use the Cartesian "X" relationship to tie the global table to your main table.

              Then by defining relationships from your data tables to your global table you can show the items you want "filtered" by the global fields

              ie GBLTable::GBL_ClincTskStatus = clinicaltasks:status etc

              Ive do this kind of thing a lot.

              The big caveat is that you must have at least one record in the Global Table. You can control this with a startup script.

               

              • 4. Re: Am I asking the impossible for a layout?
                philmodjunk

                My answer would be essentially the same as aammondd, though I often just keep global fields used in relationships in the parent table rather than define it in a globals table. Don't have a strong reason to do it that way, it's more a matter of personal preference.

                You can also use calculation fields in your table to function as constants that filter the portal relationship as desired:

                Patients::PatientID = CompletedTasks::PatientID AND
                Patients::constCompleted = CompletedTasks::Status

                Could be used in a portal to show all completed tasks for a given patient. CompletedTasks would be a new table occurrence of Tasks and constCompleted is a calculation field that is defined with just a literal string in quotes: "Completed" set to return text. (It can also be a number value of 1 if you use a 1 in your status field to show a task is completed.

                That then sets up an option for your portal of uncompleted tasks:

                Patients::PatientID = UncompletedTasks::PatientID AND
                Patients::constUncompleted = UncompletedTasks::Status

                That way a portal to CompletedTasks lists only completed tasks for a given patient and a portal to UncompletedTasks list only uncompleted tasks for that same patient

                • 5. Re: Am I asking the impossible for a layout?
                  MadMacs

                  Thanks guys for your response. Okay, I have tried to replicate what you suggested. I did try to add some pictures but FMP Forum doesn't seem to like links to my MobileMe gallery - thought it was all Apple but there you go. I will try to explain the problem and what I've done. My Task table is connected to the main table via the CompanyID field via a Cartesian X relationship. I have created global versions of the fields I want to display in the portal in the Tasks table along with a calculation field constCompleted from Tasks, = Status = "Completed". I then created an incidence of the Task table and named it CompletedTasks which is related to the Tasks table through the constCompleted, gDueDate, gStatus and gSubject fields. I've tried them individually but whatever combination of fields I use, I end up with about 10 rows of blank records in the portal. I have set up a conditional format in the Due Date field to display overdue items as white text in a red block. This is showing just as the red block so I guess that whatever its trying to display is therefore not a completed data field. The number of blank rows corresponds to the actual total number of test tasks in the table, of which 6 have been completed. Any ideas where I've gone wrong?

                  • 6. Re: Am I asking the impossible for a layout?
                    aammondd

                    For some of it I think you may have inadvertant "invisible" formatting.

                    In layout mode select each field and make sure the text color isnt the same as your background color.

                    This is real easy to do on accident. (Especially if you are simply using the default white background)

                    A real easy way to check would be to select the portal and change it to alternating background then see if some of your rows show up.

                    The fact that you get a number of rows of red blocks shows that you have data. Either a calculation isnt occuring or the fields you are displaying are not from the same table occurance as the portal is.

                     

                    • 7. Re: Am I asking the impossible for a layout?
                      MadMacs

                      Definitely not formatting, that's okay. I think its because I'm just not getting how the global field is working. I've tried setting up a table of gTask fields but how should I connect these to the original task table? I've tried Global:gTaskDueDate = Task:DueDate, Global:gTaskStatus = Task:Status etc for the fields I wish to display in the portal. I have tried auto lookup for Global field settings to the original Task table, I've tried the same for calculated validation also in Global field settings to see if that will help me filter.  The best I've managed is to display is just one entry.  I've tried duplicating the Task table and renaming it TasksOutstanding - this will display everything in the portal if linked to the MainTable by cartesian X but if I route it via the Global table it displays nothing. As far as I can see there's no way just to edit this table occurence I named TasksOutstanding as it is still the original Task table but renamed. While the relationship between it and the Global or Task table is definable by field, you cannot use this to filter to "Completed" or "1" in the case of the constCompleted calculation field suggested by PhilModJunk. I've got to be missing something pretty basic here.

                      • 8. Re: Am I asking the impossible for a layout?
                        aammondd

                        Go to your global table layout and add 1 record.

                        Portals linked to global fields need to have a record that the global field is attached to in order to process correctly.

                        If you add a non global UserID field  to the global table you can add a short on layout enter script to locate or create a single record on the global table that matches the userid this will ensure that there will always be a record of global fields for the portal to relate to.

                         

                        • 9. Re: Am I asking the impossible for a layout?
                          philmodjunk

                          Another possible cause for "blank records" in a portal is if the fields you choose could be from a different "table occurrence" than the portal. While in layout mode, double click the portal to open Portal Setup... and check the name in "Show Records From".  Double click each field and check the name in the drop down at the top of the specify fields drop down. If you see exactly the same name in both drop downs, this is not the issue. If the names are different, it may be the problem.

                          Table Occurrences, BTW, are the "boxes" found in Manage | Datbase | Relationships. They are "pointers" that refer to a table defined on the Tables tab of the same dialog or even a table defined in another FileMaker file or ODBC source if you set up an occurrence to point to a table in that location. While FileMaker creates one such occurrence for every new table you create and with exactly the same name as the table, you can create multiple table occurrences that all "point to" the same table.

                          For more on this subject, see this tutorial: 

                          Tutorial: What are Table Occurrences?

                          • 10. Re: Am I asking the impossible for a layout?
                            MadMacs

                            Thanks guys. I've checked my portal and that's set to my Global table and contains gFields from the global table. I've created a script to create a new record entering text into a UserID field, this shows in my layout of the Global table but nothing else. My portal looks great but is completely empty! If I change the portal to TasksOutsanding (an OT of the Tasks table which seems to conform with the post PhilModJunk put in his last message) it displays all my tasks but I'm then back to square one as all I want to do is display outstanding tasks. Just to say, my Global table is linked to my maintable using the cartesian x relationship, (the layout I'm using for my home page, which contains the portal, is associated to the maintable). My Global table is linked to the TaskOutstanding table Global:gTaskStatus=TaskOutstanding:Status. None of the Global table fields are otherwise linked or have calculations asI would just be happy to display something in the portal before adding somekind of filter perhaps based on the constCompleted field previously set-up. 

                            • 11. Re: Am I asking the impossible for a layout?
                              aammondd

                              how are your main table and task tables normally linked

                               if you set a value in  the global tables status field (you can make this a dropdown of status values)  you should get all  tasks with the same status as the global tables status field

                               

                              • 12. Re: Am I asking the impossible for a layout?
                                philmodjunk

                                If all else fails, you can upload a copy of your file to a file sharing site and post the download link here so that someone can download it and take a closer look.

                                • 13. Re: Am I asking the impossible for a layout?
                                  MadMacs

                                  aammondd, my main table and task tables are linked using a field called CompanyID that appears in most of my tables. My main table is then linked to the task table by a Cartesian X relationship. The portal contains 4 gfields from the global table to display due date, priority, subject and action by. The problem is that neither the global table layout nor the portal display anything data whatsoever, other than the global layout which shows the UserID field.  I dont want to display the UserID field in my portal as it takes space and is not required. I have tried including this field in the portal just to make sure it displays which it does. The problem is that the global table simply does not work and this therefore must be either to do with the relationship with the task table or the way in which fields in the global table are able to get data from the task table. I have tried things like gTaskStatus=TaskStatus on its own to create a link, I have also tried linking all fields to be displayed in the portal bit the global layout will never show more than one record or two identical records.  I've checked obvious stuff like making sure storage on global fields is set to global and have experimented with the number of repetitions but all to no avail. I have also tried setting autofill lookup and autofill calculated to link the gfields to their corresponding task fields. I must be missing something obvious here as you guys seem to get your global fields working for you!

                                  • 14. Re: Am I asking the impossible for a layout?
                                    philmodjunk

                                    A global field is a field that has Global Storage specified in Field Options. 

                                    With global storage enabled, you see the same value in the field no matter what record, or layout you are on as it stores only one value for all the records in the table where it is defined.

                                    Thus, I don't quite follow why you would put global fields in a portal. If I defined a global field gFruit and stored "Apple" in it and then put it in a portal of 5 related records, I would see the same text, "Apple" appear in all 5 portal rows and this wouldn't make much since here.

                                    1 2 Previous Next