Skip to content
Content only available in english

$extRef() - External reference fields

This keyword is used to link an instance to an external entity (an entity of any other system external to RecordM). The first parameter is the name of the external system we want to use and the second indicates the URI template to use when searching for entities in that system. In the example included below, we are using UserM (CoB's module for user account and permission management) as the external system to which we intend to link all instances of the given definition. As a second parameter we assign the relative path to the users listing according to the search query introduced as an input value at the instance level:

Usage:

$extRef(System name,Search URI template)

Options:

  • System name: The name of the external system that is already configured in RecordM
  • Search URI template: The URI used to query the information in the external system

Dynamic Field Values in Queries

When defining the query argument in $ref(), it is possible to use the value of another field from the current instance dynamically.

To reference another field, use the following syntax: __FieldName__, where FieldName is the field whose value you want to inject into the query.

WARNING

Important Notes

  • The field name must be written exactly as defined.
  • The syntax requires double underscores before and after the field name.
  • The substitution happens before the query is executed (in the frontend).
  • If the referenced field has no value, the FieldName will not be replaced. The query might not work as intended.

Examples:

Basic Example

$extRef(userm,/userm/user/search?q={{this}})

screen_shot_2022-11-02_at_11.57.23


screen_shot_2022-11-02_at_11.58.06

Here is a small video showing how to use a $extRef() keyword in a definition field at the instance level:


Dynamic Field Values - Example

$ref(orders, client_name:__name__ country:__country__)

screenshot_2026-03-09_at_10.25.40

This will:

  • Filter orders using the current instance’s name and country values screenshot_2026-03-09_at_10.29.21