3 Replies Latest reply on Jan 6, 2016 7:27 AM by Mike_Mitchell

    Prioritising related fields

      How does FileMaker prioritise fields that have different values belonging to different related records?


      For example

       

      Clients ------< Requests

       

      Requests::RequestStatus

      Take this field for example, if RequestStatus is 'Outstanding' for one related record and for another related record it is 'Withdrawn' - when referring to the client record and using the ::RequestStatus in the relationship field which status would it refer to when there are different related records that have different values?

       

      Portal_Clients_Request_Status.PNG

        • 1. Re: Prioritising related fields
          Mike_Mitchell

          If the relationship is sorted, the records are presented in the sort order. If not, they're presented in creation order. As you guessed, a plain related field on a layout outside the portal will give you the first record in that order.

          1 of 1 people found this helpful
          • 2. Re: Prioritising related fields

            That makes sense, thanks - when you say 'relationship is sorted' do you mean sorting the portal rows or is this something different?

             

            Would there be any way to prioritse through a calculation if there was a 'Withdrawn' request, to just show ::RequestStatus as 'Outstanding' regardless of if it was first or not.

            • 3. Re: Prioritising related fields
              Mike_Mitchell

              kylerjphillips wrote:

               

              That makes sense, thanks - when you say 'relationship is sorted' do you mean sorting the portal rows or is this something different?

               

               

              Go to File > Manage > Database. On the Relationships tab, double-click the relationship between the two tables:

               

              relationship.png

               

              In the resulting dialog, click the "Sort records" checkbox:

               

              dialog.png

               

              Set the sort criteria as needed.

               

              Would there be any way to prioritse through a calculation if there was a 'Withdrawn' request, to just show ::RequestStatus as 'Outstanding' regardless of if it was first or not.

               

              Of course. It's software; you can do anything.  

               

              In this case, you can filter the portal to display only the records you like. Or, you can add an extra predicate (pair of fields) to the relationship itself to perform the filtering. Filtering the relationship is faster, but may interfere with using the relationship somewhere else. (If it does, you can create an additional Table Occurrence - TO - and create a new relationship with the additional predicate.