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
*/
// ===================================
/*__LITBR__LookUpX ( _lookUp ; _trigger )__LITBR____LITBR__by Andries Heylen, BH&A__LITBR__v.1, Mar 2010__LITBR____LITBR__This is a function to "replace" the lookup feature, so you can control it better during imports. __LITBR__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.__LITBR____LITBR__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!__LITBR____LITBR__The idea is inspired on Fabrice Nordmann's technique to overcome problems of lookups during import. I just made this into a custom function.__LITBR__*/__LITBR__Let ( __LITBR___trigger = _trigger__LITBR__;__LITBR___lookUp__LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/253__LITBR____LITBR__ Prototype: LookUpX( _lookUp; _trigger )__LITBR__ Function Author: Andries Heylen (http://www.fmfunctions.com/mid/57)__LITBR__ Last updated: 20 March 2010__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.