AgileApps Support Wiki Pre Release

Lookup-Derived Fields

From AgileApps Support Wiki

About Lookup-Derived Fields

Lookup-Derived Fields are based on Lookup fields. They allow data from a record that is the target of the Lookup to be displayed as though it were part of the current record.

For example, when Object B contains a Lookup field that relates to Object A, Lookup-derived fields can be selected that display as read-only fields (from Object B) within a record in Object A.

Examples
  • Display a Customer Address in an Order record
  • Show a list of components associated with a service or product merchandise
  • Show the contact information for an Employee assigned to an IT asset
Considerations
  • Lookup-derived fields are read-only. They cannot be modified.

Working with Lookup-Derived Fields

To add Lookup-Derived Fields:

  • Click GearIcon.png > Customization > Objects > {object} > Fields tab > {lookupField}
  • In the Additional Fields to Display section, select additional fields from the Available Fields list, and move them to the Selected Fields column

HowTo:Display Customer Data in an Order as a Read-Only Field

This example shows how to display data from a Customer record as a read-only field in an Order.

About the Process

In outline, a Lookup field that targets Customers is added to the Orders object. In the Lookup definition, Customer fields are then selected as "Additional Fields to Display" lookup. Finally, those fields are placed in a Form in the Orders object.

Notepad.png

Note: For an alternative, consider doing a Lookup-Based Auto-Copy of Field Data. That method makes a copy of the data in the current record. You can then edit the value without changing the original data. You might use that feature for the Customer's phone number, for example, to allow a temporary number to be used for today's order.

Comparison of the two methods
  • Lookup-derived fields are displayed when the user is selecting a target record. Auto-copy fields aren't.
  • Lookup-derived fields are not automatically included in record forms. You have to add them manually.
  • Lookup-derived fields are read-only. The contents of Auto-copy fields can be modified.}}

Add a Customer Lookup

If one does not already exist, add a Customer Lookup to the Orders object:

  1. Visit GearIcon.png > Customization > Objects > Orders
  2. Click the Fields tab
  3. If a Related to Customer lookup field does not already exist, add it, using the following parameters:
    • Label - Related to Customer
    • Display Type - Lookup
    • Object Name - Customers

Specify the Lookup-derived Field (Additional Field to Display)

While adding the field (or editing it, if it already exists), you can now specify the Lookup-derived field. The Customer Name already appears to identify the lookup record, so here you'll specify the company address:

  1. Go to the section Lookup Field Configuration and under that, to Additional Fields to Display
  2. Select Customer Address and move it from the Available Fields list to the list of Selected Fields.
    You have now specified Customer Address as a lookup-derived field in the Orders object. (Note that you could choose to copy data to a field, instead.)
  3. Click [Save]
Learn more: Create a Lookup Field

Include the Field in the Record Display Form

The last step is to include the read-only lookup-derived field in the Orders display form:

  1. Visit GearIcon.png > Customization > Objects > Orders
  2. Click the Forms tab
  3. In the Elements list, under the Fields tab, locate the field you created: Related to Customer Customer Address. (Mentally insert a comma when reading that label, so you see it as "Related to Customer, Customer Address".)
  4. Drag that field into the form, at the location where you want it to be displayed.
  5. Click [Save Changes]
  6. Click the pencil icon PencilIcon.png next to the field, to edit it.
  7. Change the label that appears in the form:
    Display Label - Customer Address.
  8. Click [Save]

Try it Out

From a Customer record, add an order. (That's the easiest way to do it, because the Related to Customer Lookup field is filled in for you.)

  1. Click the Customers tab.
  2. In the Related Information section, where the Orders appear, click [New Record]
  3. Add the information needed to place the order.
  4. Click [Save]
    A new record appears in the Orders section of the Customer record.
  5. Click the folder icon FolderIcon.png for the Order.
    The Order record appears, with the Customer Address displayed.
  6. Click [Edit]. Note that the Customer Address field can't be edited.