LookUpX ( )

Function stats

Average user rating
57
253
9999
Support
FileMaker 7.0 +
Date posted
20 March 2010
Version
1
Recursive function
No

Author Info
 Andries Heylen

6 functions

Average Rating 5.0

author_avatar



 

Function overview

Prototype

LookUpX  ( _lookUp;   _trigger )


Parameters

_lookUp  the field to look up


_trigger  the field that will trigger the lookup


Description

Tags:  LookUp  

LookUpX ( _trigger ; _lookUp )

by Andries Heylen, BH&A
v.1, Mar 2010

This is a function to "replace" the lookup feature, so you can control it better during imports.
FileMaker suggests to use LookUp ( myTable::MyField ) & Left ( _MyTriggerField ; 0 ), to update lookups based on a trigger. However I think this is just a nicer approach.

You can add more fields to the _trigger by appending them with the "&" sign. For example MyTable::Trigger1 & MyTable::Trigger2. Remember: the trigger field has to be a field in the same table!

The idea is inspired on Fabrice Nordmann's technique to overcome problems of lookups during import. I just made this into a custom function.

Examples

Sample input

LookUpX ( MyLookUpField ; MyTriggerField1 & MyTriggerField2 )


Sample output

returns the updated value of MyLookUpField, whenever MyTriggerField1 or MyTriggerField2 is updated.

 

Function code

/*
LookUpX ( _lookUp ; _trigger )

by Andries Heylen, BH&A
v.1, Mar 2010

This is a function to "replace" the lookup feature, so you can control it better during imports.
FileMaker suggests to use LookUp ( myTable::MyField ) & Left ( _MyTriggerField ; 0 ), to update lookups based on a trigger. However I think this is just a nicer approach.

You can add more fields to the _trigger by appending them with the "&" sign. For example MyTable::Trigger1 & MyTable::Trigger2. Remember: the trigger field has to be a field in the same table!

The idea is inspired on Fabrice Nordmann's technique to overcome problems of lookups during import. I just made this into a custom function.
*/
Let (
_trigger = _trigger
;
_lookUp
)

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/253

    Prototype: LookUpX( _lookUp; _trigger )
    Function Author: Andries Heylen (http://www.fmfunctions.com/mid/57)
    Last updated: 20 March 2010
    Version: 1

*/
// ===================================

 

 

 

 


Login or register to comment

Create a new account with fmcustomfunctions.com or login to post a comment.

 

 

 

Top Tags

Text Parsing  (31)
List  (20)
XML  (20)
Date  (19)
Format  (18)
Debug  (12)
Dev  (11)
Variables  (11)
Layout  (11)
Interface  (10)
Text  (10)
Filter  (10)
ValueIterator  (6)
Layout Objects  (6)
Uuid  (6)
HTML  (6)