July 25, 200520 yr Need help with script for button that scrolls though portal records. The portal displays one record at a time and has an up and a down button. When the down button hits bottom, one more click brings you back to the first record. That was easy, it just recognizes the empty fields of the bottom record. What I want is for the UP button to work the opposite way - that is, if the first record is in view, a click on the UP button brings you to the bottom record. Thanks
July 25, 200520 yr Author Got it. For those interested: Since the portal records are sorted by creation timestamp, create a Summary field to find maximum creation timestamp. So the script says: if timestamp = max timestamp, go to last record, otherwise previous record. The buttons have to be in the portal to work. Now, is there a simpler way?
July 25, 200520 yr Why not use the Get( PortalRow) function to work out what portal row is selected. The Max function will become slow as the number of related records increases, sine it has to do quite a bit of maths to return its result.
Create an account or sign in to comment