Lookup Field

Updated 

The Lookup Field in Entity Studio is a field that establishes a relationship between two entities. It allows you to link records from one entity (the child) to another entity (the parent), thereby creating a dynamic reference. This field type enables the management of cross-entity relationships, where a record in the current entity can refer to a record in another entity.

For example, you can use a Lookup Field to link an Order record to a Customer record, enabling the Order record to reference the associated Customer record.

Use Cases

The Lookup Field should be used when you need to reference data from another entity and establish a
relationship between records. Typical use cases include:

  • Establishing Parent-Child Relationships: For example, linking an Order entity to a Customer entity, where each order is associated with a specific customer.

  • Linking Shared Data: When you need to reference shared data between entities, like linking Employees to Departments or Managers.

Using the Lookup Field creates structured and meaningful connections between data, making it easier to manage and analyze relationships.

Configuring the Lookup Field

Follow these steps to configure the Lookup Field:

  1. Navigate to Launchpad. From the Sprinklr Service tab, click Entity Studio from the Persona Apps section.

  2. The Entity Manager page appears with the list of entities.

  3. Search for the desired entity in the search bar. Click on the 3 dots and then click the View button next to the entity name.

  4. On the left navigation pane, click Fields and Relationships.

  5. Click the Create Field page in the top right corner of the Record Manager. The Create Field Page appears.

  6. Select Lookup from the Field Type drop-down.

The following are the fields that needs to be filled in the Create Field page.

Fields

Description

Field Type

Choose the Lookup Field type. It enables referencing records from another entity, establishing a dynamic link between records.

Name

Provide a suitable name for the field (e.g., "Related Customer", "Linked Product").

API Reference ID

A unique identifier used by the platform to reference this field programmatically (e.g., related_customer).

Help Text

Optional text displayed as a tooltip to guide users on the field’s purpose (e.g., "Select the associated customer for this order").

Select the Entity to Reference

Choose the parent entity whose records this field will reference (e.g., select “Customer” if linking an Order to a Customer).

Placeholder

Placeholder text shown when the field is empty (e.g., "Select a Customer").

Configure Lookup Record Deletion Behavior

Controls how the system handles deletion of the referenced (parent) record:

  • Delete This Record – Deletes the child if the parent is deleted.

  • Don't Allow Deletion of Lookup Record – Prevents child record deletion if parent record is deleted.

Entity Filter (Optional)

Allows filtering of lookup options based on fields in the referenced entity. Useful when showing only relevant lookup records.

Detailed Lookup

Allow Multi Selection

Provide a maximum character limit beyond which the customer cannot provide input. For example, the limit is 10. Any input beyond 10 characters will not be allowed.

Mandatory Field

When enabled, the field must be filled before saving the record.

Enable Sorting

Allows sorting of records in the Record Manager using the values in this field.

Enable Searching

Allows users to search for records using this field.

Do not allow Duplicate Values

Prevents duplicate selections in this field.

Enable Cloning

Allows the field value to be copied when a record is cloned. This is useful in scenarios where new records are often created based on existing ones, such as tickets, orders, or configurations. 

Click on the Save icon in the bottom right corner once you input the field details.

What Happens When You Click the Lookup Field in the Form or Record Manager?

Once you've created and configured the Lookup Field, here’s what happens when you interact with it in the form or record manager:

  • Name Field Populated in Parent Entity:

    • If the referenced (parent) entity has the Name field populated for records, the Lookup Field in the child entity will display the Name field of the parent entity records in the form or record manager.

    • For example, if the parent entity is Customer and the Name field contains "John Doe", then when you click on the lookup field in the child entity (e.g., Order), it will show "John Doe" in the dropdown.

  • Name Field Not Populated in Parent Entity:

    • If the parent entity records does not have the Name field populated, the Lookup Field will display the Record ID of the parent entity in the form or record manager.

    • This ensures that even when the Name field is empty, users can still identify and select the correct referenced record via its unique ID.

  • Dropdown Behavior:

    • When you click on the Lookup Field in the form or record manager, a dropdown will appear, showing the available lookup records.

    • If the Name field is populated, the dropdown will display the name of the referenced records. If not, the Record ID will be shown instead.

Summary

The Lookup Field in Entity Studio is an essential tool for establishing relationships between entities. It enables you to reference records from other entities, creating parent-child relationships and allowing for better data organization.

The configuration options provide flexibility in how the field behaves, such as enabling multi-selection, mandatory fields, and record deletion behaviors. By configuring and using the Lookup Field effectively, you can enhance data relationships, improve reporting, and streamline data entry in your system.