Note: The LOOKUP expression will be recalculated on every save of the record containing the expression. If the value for the Field in the calling App matches multiple values in the Lookup App then the value brought back will be from the first record found.
lookup('AppID','[ThisAppFieldID]','LOOKUPAppFieldID','LOOKUPFieldToReturn','ValueIfNotFound',ExactMatch?)
AppID is the ID of the App that you are looking up into.
ThisAppFieldID is the ID of the Field in the calling App being used as the field to look up a value in the Lookup App. The field ID DOES need square brackets around it.
LOOKUPAppFieldID is the Field ID in the lookup App being compared to [ThisAppFieldID] app containing the expression. The field ID does not need square brackets around it.
LOOKUPAppFieldToReturn is the Field in the app being looked up from for which the value will be returned on a successful find of a Record. The field ID does not need square brackets around it.
ValueIfNotFound is the value the Field is to be set to if no Records in the Lookup App are a match. If this value is numeric it does not need quotes around it.
ExactMatch? is a boolean property, either true or false (no capitals).
- true: If true, the values in the compared Fields must be an exact match
- false: If false, then the first record in the Lookup App with a value for the compared Fields that contains the value from the calling app will be a match.
Example: Below is an example of a look-up expression from a projects app to the accounts app to pull back the account name based on the account ID entered in the projects record
lookup('Accounts','[AccountID]','AccountID','AccountName','No Account Found', true)
To see more on the Lookup field, please click here
Make sure to click the 'Save' button when making any changes in order for them to be added to the next app version. Once you have made all the changes you need to an application you are then ready to publish it to workspace.
Note on Field Dependencies - Read more here
Field dependencies are by definition the other field(s) that are reliant on a given field, usually dependent fields are interlinked to one another by expressions and are indicated by an atom symbol. They are a crucial tool when looking to delete Fields within an App or, when it comes to understanding the structure and data flows of an App.
Comments
0 comments
Article is closed for comments.