7 Replies Latest reply on Aug 13, 2013 8:36 AM by TimHorton_1

    List function



      List function



           I have two tables.

           I am trying to create a field in table 1 that would concatenate the COMPANY field from table 2.

           Basically, I would like the "List function" to replicate what I find in the portal I made.

           But now, the list function returns 14000 lines of COMPANY names!... Is there a way to filter what it returns?

           Hope the email is clear enough.



        • 1. Re: List function

               And how is your portal set up? Is if filtered? If filtered, what is the filter that you set up?

          • 2. Re: List function

                 The portal has three fields (Table 2::Liens alt)  :

            •           Liens_Itin
            •           Company
            •           TourID

                 It is sorted on the Table1::Liens_Itin

                 It is filtered as Table 1::Liens_Itin = Table 2::Liens Alt


            • 3. Re: List function

                   Is it really filtered or is that just the relationship defined in Manage | Database | Relationships?

                   If that's the filter, what is the relationship.

                   I don't see why the list function returns a large number of values an your portal shows only one.

              • 4. Re: List function

                     Here is two captures. the first one.

                     Hope it helps.

                • 5. Re: List function

                       the second one

                  • 6. Re: List function

                         The filter that limits the records displayed is why you have one record showing in your portal and your list function returns many names. Calculations will bypass any filter expressions and will return a result based solely on the relationship you define.

                         If you want the list function to return the same company name(s) shown in the portal, you'll need to define a different relationship that matches to just the records you get in the portal.

                         Such as:

                         Liens_Itin::K_ID_Liens_Itn = Liens_Itin_alt::K_ID_Liens AND
                         Liens_Itin::kf_ID_Tour = Liens_Itin_alt::kf_Tour ID

                         You may need to create a new table occurrence for this relationship if changing the relationship you've posted here is needed in other parts of your solution design.

                         Another option would be to use ExecuteSQL() instead of List(). That would not require any changes to the relationship graph as you can define the needed relationship as part of the SQL query. ExecuteSQL isn't available for this in Versions prior to FileMaker 12.

                    • 7. Re: List function

                           Good stuff.

                           I'll try those solutions.

                           Thanks for your precious help.