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

Portal_Row_Number ( ID ; Field ; Counter )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.2  (31 votes)
  Discuss this Custom Function

Simon Ward, Linear Blue Ltd.
http://www.linearblue.com

Find a record number from its position in a portal row.

Sample Input:
Portal_Row_Number ( 2 ; Related::_kp_Field ; 1 )
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 calculation will display which portal row a record is based on a Pirmary table and Line items table. There must be a relationsip between the Line Items table and its self based on the Primary Table Key. i.e each line item will display the same portal that would be seen from the Primary record. In the Calculation the Related::_kp_Field is over this self relationship.

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:

Hi Simon

Thank you for posting this CF. I couldn't get it to work in FM14 but your concept was so elegant that I've slightly modified the code and it seems to work for me.

The changes I've made are; including totalRows in the parameter set (so it is determined once rather than for each iteration) and including the 'getField' function in the getNthRecord element.

So, my version of your CF is now:

Case (

Counter > totalRows ; "0" ;

ID = GetNthRecord ( GetField ( Field ) ; Counter ) ; Counter ;

Portal_Row_Number ( ID ; Field ; totalRows ; Counter + 1 )

)

I couldn't understand the part of the description regarding the requirement for the TO relationship definition, but the modified code seems (so far!) to work on any portal without any further TO being required. All I send the CF is; 'getfield ( the PrimaryKey field )' for the current portal row, 'getfieldname ( PrimaryKey field)', the number of rows of the current portal relationship, & '1'.

John Buckingham, Inverness, UK
November 29, 2016 1:13am

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 3 + 5 =
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. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions