7 Replies Latest reply on Jul 23, 2016 1:42 PM by clayhendrix

    How to show all record of a table in a portal?

    gilcano

      Hi everyone, as you know I'm designing a Work Order Maintenance Application and encounter a little problem I don't know how to solve.  In the LAYOUT-WorkOrders=Table-WORKORDERS which is related to the table TENANTS by the _pk_UNIT_NO I show the information of the WO and the TENANT who requested the service (_pk_UNIT_NO) but I also like to have a portal on the right side of the screen with all the WO in a row (Like a EXCEL sheet) showing all the records for the WO table sorted by WO#. Since portal used related tables only it display just one record, the record related to the table TENANT(_pk_UNIT_NO).  Check the example below it's about something else but this is what I would like  to do.

      Thanks

       

       

       

       

      Portal.png

        • 1. Re: How to show all record of a table in a portal?
          schamblee

          Create another relationship using the Cartesian sign instead of Equal sign, this will show all records.Using the Cartesian Product Relationship in FileMaker Pro | FileMaker

          • 2. Re: How to show all record of a table in a portal?
            gilcano

            Create another relationship using the Cartesian sign instead of Equal sign

            GREAT!!! 

            Thank you very much, very much appreciated

            • 3. Re: How to show all record of a table in a portal?
              clayhendrix

              I had found the Cartesian relationship to display all of the records from the 2nd table occurrence, however, I actually want the user to be able to click on one of those records displayed in the portal and go to that record. The problem is that when I use Button Setup to do that as I usually do, it doesn't change records because the relationship indicates that all records are related.

               

              So, next I tried the "not equal" relationship. The portal then displayed all of the records except the one being viewed, which is okay because the purpose of the portal is to allow the user to go to a DIFFERENT record, however, when the user clicks the field/button, the record being displayed does NOT change.

               

              So, next I changed the setup of the field/button to Get Related Records from 2nd Table Occurrence using Current Layout (originally I had it setup to Get Related Records from the same table upon which the Layout is Based). It works now, but it seems weird to me that it is showing the related record from a table to which the layout is not based. Maybe I'm making it too hard and it is supposed to work this way. It works using the "not equal" relationship between the table and the 2nd table occurrence as well as using the Cartesian relationship.

               

              Can someone confirm that I should just chill out? I suppose since it is a Table Occurrence and not another Table, that this is how it is supposed to work. I am new to multiple Table Occurrences.

              • 4. Re: How to show all record of a table in a portal?
                philmodjunk

                regardless of the relationship, go to related records can be used from a button in the portal row as this will make the record clicked in the portal your current record.

                 

                However, this will also produce a found set of all records due to that Cartesian join. Thus, it is probably better to set a variable to a unique value from the portal record and use it to perform a find for the record.

                • 5. Re: How to show all record of a table in a portal?
                  clayhendrix

                  philmodjunk wrote:

                   

                  However, this will also produce a found set of all records due to that Cartesian join. Thus, it is probably better to set a variable to a unique value from the portal record and use it to perform a find for the record.

                  That was my first thought, but I was unable to write a script that did that. Can you give me some pointers?

                  • 6. Re: How to show all record of a table in a portal?
                    philmodjunk

                    This is one of the reasons to set up tables to have a primary key even if you don't need it for relationships.

                     

                    Say you have a field, __pkPortalID, That aIto-enters a serial number or get ( UUID ). A button in the portal row could do the following:

                     

                    Set Variable [ $ID ; portalTable::__pkPortalID ]

                    go to layout [ "portalTable" (portalTable) ]

                    enter find mode [ ]

                    set field [ portalTable; $ID ]

                    perform find []

                    1 of 1 people found this helpful
                    • 7. Re: How to show all record of a table in a portal?
                      clayhendrix

                      Thank you! That works. I have needed that for other solutions.

                       

                      I always make a pk field too.