Brian Dunning's FileMaker Custom Functions

SelfTest ( UseSelf )

Allow for direct input ("override") of auto enter calc field.

  Average rating: 4.3 (39 votes) Log in to vote

Mark D Kerr   Mark D Kerr
Discovery Reef Design & Consulting

Share on Facebook Share on Twitter

  Sample input:
SelfTest ( Self )
  Sample output:
1

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

Using "SelfTest ( Self )"

in an auto enter calculation, tests for direct input of a value, while eliminating field renaming concerns, as would occur if using ...

Get ( ActiveFieldName ) = "Date_Final"

 

Comments

dbyte solutions   dbyte solutions, Munich
Jun 13, 2009
[QUOTE] tests for direct input of a value, while eliminating field renaming concerns, as would occur if using ...
Get ( ActiveFieldName ) = "Date_Final" [/ QUOTE]

Hi Mark,

use "GetFieldname()" (FM 10) to test for a specified active field without using hard coded names:

GetValue( Substitute( GetFieldname( YourTO::Date_Final); "::"; "¶" ); 2 )
 
Mark D Kerr   Mark D Kerr, Discovery Reef Design & Consulting
Aug 14, 2010
Agreed, you see the GetFieldName function as line 3 of the CF. I use this behavior in cross calculating values a LOT. IMHO, it's way easier to input the test/result as...

SelfTest ( Self ) ; Self ;....

than to produce....

GetValue ( Substitute ( GetFieldname ( YourTO::Date_Final ) ; "::"; "¶" ) ; 2 ) = Get ( ActiveFieldName ) ; Self

N'est pas?
 
JT   JT
Mar 8, 2018
Alternatively,

GetFieldName ( Evaluate ( Get ( ActiveFieldName ) ) ) = GetFieldName ( UseSelf )
 

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.