Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


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:  

RatingRatingRatingRatingRating
  Average rating: 4.4  (33 votes)
  Discuss this Custom Function

Arnold Kegebein,
http://www.kegebein.net

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

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


 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

Description:

THIS CF IS FOR FM12 ONLY! For a FM11 version of this function check out http://www.briandunning.com/cf/1243.

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 BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

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:
City/Location:
Comment:
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 9 + 4 =
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. NumberToHexadecimal(NumberValue)
  (Fri, Dec 08, 8:54am)
2. Get_BaseTable
  (Thu, Dec 07, 4:27pm)
3. JSONCreateVarsFromKeys ( json ; namespace )
  (Wed, Dec 06, 8:21pm)
4. GetTableNzme ( field )
  (Tue, Dec 05, 9:16pm)
5. TimeFormatAsText ( theTime )
  (Mon, Nov 13, 1:59pm)
6. ParseWebValueList( text )
  (Thu, Nov 02, 9:52am)
7. SVG_HTML_to_Text ( _svg_text ; _orig_text ;
  (Wed, Oct 25, 4:17am)
8. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)

RSS Feed of Custom Functions