# $references() - Reference Fields

This keyword is used to list referenced instances from other definitions. The first parameter is the name of the definition we want to reference and the second parameter refers to a field of that definition.

# Usage:

$references(definition_name,referenced definition field,[Parameters])

Options:

  • definition_name: The referenced definition name
  • referenced definition field: The field used from the referenced definition that connects the instances
Parameter Description
showImport when assigned the true value, the Import Records button for importing instances to the referenced definition will be displayed. Default value is false
showViews when assigned the true value, the Active View button for selecting one of the available instance listing views will be displayed. Default value is false
view the visualization to apply to the search results (default: undefined). Usage: view:name_of_the_view
showActions when assigned the true value, all toolbar buttons (Export, Edit in Group, and Delete) for interacting with multiple instances and all actions for interacting with individual instances (Delete and Duplicate) will be displayed. Default value is false.
showCreateAndDelete when assigned the true value, the following user interfaces elements will be displayed: The + button for creating new instances of the referenced definition; The delete button located on the toolbar; The Delete and Duplicate actions for interacting with single instances.

# Examples

# 1. With showImport defined as true

$references(Country Series,Country Code,[showImport:true])

The effect of this parameter:

# 2. With showViews defined as true

$references(Country Series,Country Code,[showViews:true])

The effect of this parameter:

# 3. With activeVisualizationName defined with a visualization

$references(Country Series,Country Code)

# 4. With showActions defined as true

$references(Country Series,Country Code,[showActions:true])

The effect of this parameter:

# 5. With showCreateAndDelete defined as true

$references(Country Series,Country Code,[showCreateAndDelete:true])

The effect of this parameter:

# 6. With showCreateAndDelete & showActions defined as true

$references(Country Series,Country Code,[showCreateAndDelete:true,showActions:true])

The effect of this parameter - shows all options when both keywords are active:

# OLD Examples:

# 1. With all options defined as true:

$references(Country Series,Country Code,[showActions:true,showImport:true,showViews:true,showCreateAndDelete:true])


# 2. With all options defined as false:

$references(Country Series,Country Code,[showActions:false,showImport:false,showViews:false,showCreateAndDelete:false])

$references(Country Series,Country Code)

You can define which of the user interface elements for interacting with single or multiple instances you want to be displayed. In the example included below we changed all the parameter values to false:

At the instance level, the outcome of this change was that all the interface elements for interacting with the instances stopped being displayed.

Here is a brief video showing the look of the references listing depending on assigning the value true or false to all parameters of the $references keyword:

The instances are edited in a built-in way on the same page, without having to open a new window.

Below, we include examples of how assigning the false value to each of the parameters removes specific elements from the user interface.

# 3. With the showActions option defined as false:

$references(Country Series,Country Code,[showActions:false,showImport:true,showViews:true,showCreateAndDelete:true])

Continuing with the same example, when we change the value of the showActions option to false but assign the true value to all the other three parameters, all toolbar buttons for interacting with several instances at once stop being displayed, alongwith the options for interacting with individual instances:



# 4. With the showImport option defined as false:

$references(Country Series,Country Code,[showActions:true,showImport:false,showViews:true,showCreateAndDelete:true])

When we change the value of the showImport option to false, the button Import Records for importing instances to the referenced definition becomes inacessible:



# 5. With the showViews option defined as false:

$references(Country Series,Country Code,[showActions:true,showImport:true,showViews:false,showCreateAndDelete:true])

When we change the value of the showViews option to false, the button for selecting the Active View stops being displayed:



# 6. With the showCreateAndDelete option defined as false:

$references(Country Series,Country Code,[showActions:true,showImport:true,showViews:true,showCreateAndDelete:false])

When we change the value of the showCreateAndDelete option to false, the + and the Delete buttons for creating and deleting instances will stop being displayed, along with the Delete and Duplicate actions when interacting with one single instance: