Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

PortalFirstVisibleRow ( _portal )

Rate this function:  

  Average rating: 4.3  (33 votes)
  Discuss this Custom Function

Arnold Kegebein,

Get index of first visible row in a portal (FM12+ ONLY)

Sample Input:
PortalFirstVisibleRow ( "myPortal" )
Sample Output:

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed


THIS CF IS FOR FM12 ONLY! For a FM11 version of this function check out

Calculates the index of the first visible row in a portal.
The parameter _portal is the object name of the portal.
Besides the object name for the portal, at least one object in the portal has to have an object name, too.

Instructions how to use this function:
(1) Create a portal.
(2) Give the portal an object name, e. g. "myPortal"
(3) Place an object into the portal, preferably a field from the portal table.
(4) Give this object an object name, e. g. "myField"
(5) Change to browse mode.
(6) Call the function (via data viewer or script or button): PortalFirstVisibleRow( "myPortal" )
(7) Scroll to a different row in the portal and call the function again.
(A) If the function returns 1, the very first portal row is visible. The return value 5 means, the portal is scrolled so far down, that the first four portal rows are not or less than 50% of the row height visible.
(B) To verify the correct return value, add a label with the text "@@" to the portal. This will print the actual index of each portal row. The first index you can see in your portal should be the same value the function returns.

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


5 most recent comments | Show all 6 comments

hi Arnold,
In testing this function I notice that it works great in FileMaker Pro 12, but is not working in FileMaker Go 12. In GO 12, the max visible row it returns is 2, even if you are scrolled well down the portal. However the same solution in Pro shows the correct first visible row.

I'm not sure how this could be fixed, and perhaps it is a bug with Go, do you know of any ideas?

Daniel Wood, New Zealand
October 04, 2012 1:39am

Not working here. I think there is a problem with the syntax. Using FM12

silba, Chicago
January 28, 2013 2:12pm

I cant get it to work either. I have named the portal and a field in the portal but just get ? as the result. Are you able to post an exmple file like you did with the fm11 version? (that works)

Chris, Melborne
May 08, 2013 6:51pm

This function is recursion bombing. Arnold, I was very hopeful when I stumbled across this but it's not working as noted by the previous 2 posts. Now on FM14. Did FM change behavior again? I could not get the pre FM 12 version to work either.

Rob, Cleveland, OH
September 25, 2015 6:11am

That was just what I needed. Great job! Thank you!

moxa4, Berne, Switzerland
September 27, 2016 3:51pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 8 + 3 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
2. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)
3. WindowNamesAll ( dbNames ; excludeCurrentWindow )
  (Sat, May 12, 11:34am)
4. RandomChoiceFromList ( values ; required )
  (Wed, May 02, 6:35am)
5. @JSONFormatElements ( json )
  (Fri, Apr 27, 7:31am)
6. MBS-OCR ( language ; Image )
  (Mon, Apr 23, 1:48pm)
7. MBS_Image_Rotate ( Picture ; rotation )
  (Mon, Apr 23, 1:27pm)
8. UnQuote ( string )
  (Tue, Apr 10, 12:34pm)

RSS Feed of Custom Functions