dwins Posted July 25, 2005 Posted July 25, 2005 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
dwins Posted July 25, 2005 Author Posted July 25, 2005 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?
Vaughan Posted July 25, 2005 Posted July 25, 2005 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.
Recommended Posts
This topic is 7062 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now