Skip to content
Start free trial

Set Up a Lookup Field

Add Field dialog — choose the Linked record (Relation) type to link to another entity

In HARi the field type that creates a link between two entities is called a Relation field. The terms “lookup” and “relation” mean the same thing here — a field whose value points to another record.

A relation field stores a reference to a record in another entity. In the form it appears as a searchable picker — when you start typing, HARi searches the linked entity and shows matching records.

The link works in both directions:

  • On the source entity: a relation picker field appears on the form
  • On the target entity: a subgrid appears showing all records that reference it
  1. Go to Settings > Schema
  2. Select the entity where you want to add the field (e.g. “Contact”)
  3. Open the Fields tab
  4. Click to add a new field
  5. Configure:
    • Name + Label: A clear label (e.g. “Company”, “Primary Contact”, “Related Project”)
    • Type: Select Relation
    • Related Entity: Choose the entity this field should reference (e.g. “Company”)
    • Required: Toggle on if every record must have this relationship
  6. Save

Once created, the relation field appears on the record form:

  1. Open a record (e.g. a Contact)
  2. Find the relation field (e.g. “Company”)
  3. Start typing the name of the related record
  4. HARi searches the related entity in real time
  5. Select the correct record from the results
  6. Save

The contact is now linked to that company.

On the target entity (e.g. Company), a subgrid automatically appears showing all records that reference it:

  1. Open a Company record
  2. Scroll to the Contacts subgrid
  3. You see all contacts linked to this company
  4. Click + in the subgrid to create a new contact with the company pre-filled

You can have multiple relation fields on the same entity. For example, an Opportunity might have:

  • Company — The company this deal is with
  • Primary Contact — The main contact person
  • Owner — The assigned sales rep (a relation to the Users entity)

Each relation creates its own link and subgrid.

A relation field creates a one-to-many link (one company has many contacts). For many-to-many links (a contact can belong to multiple lists, for example), use the Relations tab in the schema editor to define a habtm (has-and-belongs-to-many) relationship between the two entities.