Learn about what a reference field type is, how to configure it, and how to use it as part of Outputs. 





A Reference input field allows you to link to a previously created Record and thus, retrieve its data to populate a new Output. 


More specifically, a reference field is added to the Create form and allows a user to reference an existing Record by selecting an Output value as a key. Once selected, the fields from the referenced Record can be accessed and used to build other Outputs - these include all output fields, input values, unique values, and user attributes.


This is particularly useful for easing the workload, ensuring consistency, and also managing related records. Indeed, users wouldn't need to enter information that has already been captured in previously created records anymore. If one record is used as a 'skeleton', it also allows managers to edit the main record to update all the linked ones.


Note on terminology
It may be easier to understand the terminology around Record, Output Field, and Output Value if we look at the Records table. 

A Record corresponds to a row and it includes all data. That is, the Outputs that are generated, Inputs from the Create form, and metadata about the author. 

An Output Field corresponds to a column. This is what is built from the Outputs configuration. 

An Output Value corresponds to specific cells in an Output Field column. These are the outputs generated for a specific record. 

Example

The orange rectangle shows an example of a Record and the blue rectangle shows an example of an Output Field named 'Tracking URL'. The cell in solid blue is its output value for the specific Output Field and specific Record. 




Creating a Reference

As mentioned, a Reference is a new input field type, and as such, it can be created as any other input field from the Create form configuration. 


Learn more about how to add and configure input fields here.


The only difference is in its general configuration:


  1. Reference a Record by Output value

Referencing a Record works by using the Output Values of a specific Output Field as a key.


  1. Add filter

The second part lets you filter the Output Values that are retrieved and shown to the user. 



Example (click here)


Let's consider we previously created an Output Field named Campaign Name. As its names suggests, it generates names for campaigns.


Now, I want to update my Create form so that it retrieves and lets users choose between all the created campaign name values. However, only Facebook campaign names should be shown. 


The settings would look at follows:




1. Reference Record

When referencing a Record, the Output value of a specific Output Field is used as a key. 


Hence, the first section lets you select a specific Output Field from a project. 


This sets a dropdown that lets the user select an Output Value (of the specific Output Field) when going through the  Create form. 


Tip: References fields have a target icon on the right that lets you view the referenced Record.

From the preview, select a value from the reference field > Click the target icon that appears

This will open a side panel with the details of the created Record used as a reference.



2. Add filters

Filters let you set the criteria to be met for the Output values to be retrieved. 


Click 'Add  filter' > Set criteria by defining a comparison expression


E.g., 'Market' (parameter to be evaluated) is (operator) Denmark (value).


Filters are added as tags and can be removed by clicking the 'x' icon that appears on hover. 


Multiple filters can be added by simply clicking 'Add filter'. This will set an additional tag that is appended according to an AND logic. E.g., 'Medium' is 'Social Paid' AND Source is not 'Facebook'.




Building an Output using a Reference

Once a Reference is created, the referenced Record can be used to build Outputs. This works by retrieving values from the referenced Record and populating the new Output(s) with them.


Tip: References can also be used in combination with Variables. 


The process of creating an Output remains the same, you can learn more about it here.


However, there is one main difference that you need to keep in mind: a Reference retrieves the fields of the specific referenced Record.


Hence, choose 'Input values' > 'Reference' > Select a value when building the Output Value (step 2 in the Output creation process).





Tip: When configuring an Output, you can view what field you are referencing.

Click the meatballs menu (...) > 'Open' / Hover on the 'Referenced' label > 'Go to ...' This will redirect you to the field and open it. 



Nested references

You can also values from one reference within another reference, enabling more complex data relationships. This is particularly useful for projects involving data hierarchies, such as campaigns, ad groups, and ads.

 

For example, you can create fields reflecting three activity types: Campaign, Ad group, and Ad (Ads belong to Ad groups, and Ad groups belong to Campaigns). Hence, when creating an Ad, specify an Ad group as a reference. Similarly, when creating an Ad group, specify a Campaign as a reference.




Example

We want to generate Output 2 by referencing Output 1 (existing). 


Where:


  • Output 1 - Campaign name
    Brand_Market_Internal-ID_Year_Campaign-description


  • Output 2 - Placement name
    (Brand)_(Market)_(Internal-ID)_Strategy_Creative-type_Audience


*(Brand, Market, and Internal ID are input values from Output 1)



The above scenario is usual when one Create form is used to generate a specific Output depending on the user selection. E.g., dropdown with values 'Campaign name' and 'Placement name'.

 

Depending on the value selected, different types of fields are shown/hidden and mandatory/optional.

 

When a user selects 'Placement name', the fields 'Strategy', 'Creative type', 'Audience', and 'Campaign name' are shown. Where 'Campaign name' is a reference field that lets the user select a previously created campaign name (an output value of Output 1).

 

Once selected, Accutics can retrieve its fields (of Output 1) and use the values from 'Brand', 'Market', and 'Internal ID' to generate a placement name (Output 2) when the user submits the form.

 

In this way, the user doesn’t have to manually fill in brand, market, and ID information and potentially make mistakes. Moreover, this would not require the user to know all pieces of information, such as the internal ID, since it is automatically retrieved.



Process

Given that we have an existing configuration that generates Output 1 - Campaign name:


  1. Add the 'Placement name' fields to the Create form


First, you need a dropdown field that allows the user to select whether they are creating a campaign or placement name - 'Activity' in the example.



Then, the following fields need to be added:


  • Strategy
  • Creative type
  • Audience
  • Campaign name (Reference field with Output Field: Output 1)


Conditions: 'Show' and 'Mandatory' when the field 'Activity' is 'Placement name'




  1. Build the Output 2 - Placement name


Since we are adding a second Output, we need to define the scenarios when each is generated. Hence, first, you need to apply conditions:


  • Campaign name (output) created when 'Activity is Campaign name'
  • Placement name (output) created when 'Activity is Placement name'



Then, you can create the output value of 'Placement name' using references:


JOIN

Delimiter: _

String:

  • Brand (from Output 1 - Campaign Name)
  • Market (from Output 1 - Campaign Name)
  • Internal ID (from Output 1 - Campaign Name)
  • Strategy
  • Creative Type
  • Audience


Lastly, you can do some fine-tuning according to your preferences. E.g.:


  • Remove delimiters for empty values - Checked
  • Output rules: Chance case - Lowercase.  Replace ' ' with '-'