2 Replies Latest reply on Feb 28, 2010 2:03 AM by leedsman

    Create a new portal row at the top of the portal list

    leedsman

      Title

      Create a new portal row at the top of the portal list

      Post

      This is my first posting to the forum, so please forgive any silly mistakes!

       

      I am using Filemaker Pro V10 and am developing a database for a charity. We are using Instant Web Publishing so that a number of staff can access the database over the Web. The database is very simple consisting of Customers who make Enquiries. The Enquiries are displayed on the Customer Screen in a portal. It is set up to allow creation of new enquiries via the relationship.

       

      My question is - when adding a new Enquiry, is it possible to create the new empty Enquiry record at the top of the list of Enquiries, rather than having to scroll right down to the bottom?? There are obviously some limitations with what can be achieved when accessing the database via the Web, but any advice would be much appreciated.

       

      Thanks, Stephen Clough

        • 1. Re: Create a new portal row at the top of the portal list
          user14360

          Hi Steven,

           

          If you have people create records by having the "allow creation of records via this relationship" checkbox selected, then the empty row that people create records in always sits at the bottom of the portal.

           

          However, if you deselect the allow creation of records via this relationship, and give people another way to create the records, then you can have the new record be at the top.

           

          For example, create a script that is along the lines of:

          set variable (ID of the customer)

          Go to layout (Enquiries)

          Create new record

          Set field (set the foreign customer ID in the Enquiries table to the ID of the customer)

          Go to layout (original layout)

          Go to object (name the portal you want to go to and use that name here)

          Go to row (first)

          Go to field... the field you want them to write into

           

          The trick here is sorting the portal by something that will always mean the empty record is at the top.  So you could have a Timestamp created field in the Enquiries table, and have the Enquiries portal sorting by the Timestamp field, in a descending manner, so the newest created enquiry will always appear at the top.

           

          I haven't implemented this with IWP, so I can't say if it all works 100% the same there, but I would imagine it would be ok.  Others might have better/different suggestions or perhaps a correction for me.

           

          • 2. Re: Create a new portal row at the top of the portal list
            leedsman

            Thanks for the information - I'll give it a try.