4 Replies Latest reply on Aug 13, 2014 3:01 PM by keywords

    Portal Question


      I have a portal for correspondence that uses a simple drop down for type with a field for the creation time and date stamp plus a notes field. I have it set to sort descending so that newest is at the top. The portal can show 5 records at once, so when it comes time to enter the sixth record the blank that you type into requires you to scroll to the bottom. How do I get that to stay at the top before the displayed records?

        • 1. Re: Portal Question

          Since it is sorted by the date/time field, when you create a new record, it goes to the bottom as those fields are empty or not committed yet.


          If those fields are auto-enter fields, you could script it to automatically save the record which would commit the record and sort it as the newest.

          • 2. Re: Portal Question

            schwinnfinnegan wrote:

            How do I get that to stay at the top before the displayed records?


            You can't – it's alway at the bottom.


            Having said that: you can duplicate the portal, make it one row, put in on top of the existing portal, and add a filter not ( PortalTO::primaryKey ) (or isEmpty () if your key is text).


            Your other portal will still have the spare row at the bottom; you cannot get rid of that by a filter, since it's an attribute of the relationship itself.


            To do that, you need a second relationship that is identical to the first one, except that it will not allow creation of related records. Then stack them like so.


            AllowRelationshipPortal [ 1 row, filter: not ( PortalTO::primaryKey ) ]


            DisallowRelationshipPortal [ n rows ]


            On the other hand, you could simply script the creation of a new record process and use a button above the portal:


            Go to Object [ objectNameOfYourPortal ]

            Go to Portal Row [ last ]

            Go to Field [ objectNameOfYourDropDownField ]


            … at which point no new record is created yet, but you're where you wanted to be.

            • 3. Re: Portal Question

              Thanks to erolst for a simple solution.

              • 4. Re: Portal Question

                Thanks from me too. Erolst posted this duplicate relationship solution in another thread a few months ago and I have found it hugely useful. Big pat on the back from me.