1 Reply Latest reply on Feb 1, 2016 7:10 AM by mikebeargie

    Email portal list sort order

    hunterkilla

      I am running a script that sends an email with a portal list and I want to be able to set the sort order but it always puts the list in the order we entered it, on the screen I have set a sort field to move them around.

       

      So the script does the following

       

      Set Field [ Enquiries::combine ; List (Enquiries data::Product) 

      Set Variable [$message; Value: "  <html> <p>Dear  " & Customers::First Name & "  <br><br>  MORE CODE HERE  

      <td  > " & Enquiries::Combine  & "  </td>

       

      Send Mail script command here

       

      So this then does the email and drops in the portal fields from Enquiries date::product   BUT not sortable... is there a way to control sorting on an email

       

      ( yes doing it this way so I can send HTML emails direct from filemaker and include fields etc. )

        • 1. Re: Email portal list sort order
          mikebeargie

          you need to sort the relationship, not the portal. Data is always evaluated from the relationship order, which by default is creation order. Specifying the sort order in the relationship dialog is the way to go.

           

          Alternatively, you can perform a loop script to manually gather the values from the portal, but sorting the relationship is easy and only one step (and has the added advantage of being able to remove your portal sort too).