Difference between revisions of "Lookup-Derived Fields"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - 'Form Layout ' to 'Form ')
imported>Aeric
m (Text replace - 'Designer > Objects' to 'File:GearIcon.png > Customization > Objects')
Β 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
Lookup-Derived Fields are based on [[Lookup]] fields, and allow record data from a second object to be displayed in the first object. Lookup-derived fields are presented as "read-only" data in the object, and cannot be modified. Β 
===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.
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.
Line 6: Line 7:
:*Show a list of components associated with a service or product merchandise
:*Show a list of components associated with a service or product merchandise
:*Show the contact information for an Employee assigned to an IT asset
:*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:
To add Lookup-Derived Fields:
:*Click '''Designer > Data > Objects > {object} > Fields tab > {lookupField}'''
:*Click '''[[File: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
:*In the Additional Fields to Display section, select additional fields from the Available Fields list, and move them to the Selected Fields column


===Example: Display Read-Only Customer Fields in Orders Records===
===HowTo:Display Customer Data in an Order as a Read-Only Field===
The following example describes how to display read-only fields from the Customer object in an Orders record. To do this, a Lookup Field is added to the Orders object, that is based on Customers. Next, Customer fields are selected to be available for lookup. Finally, the Lookup-Derived Fields are placed in a Form in the Orders object.
{{:HowTo:Display Customer Data in an Order as a Read-Only Field}}
Β 
#To add a Customer-based Lookup Field to the Orders object:
#*Click '''Designer > Data > Objects > Orders'''
#*Click the Fields tab and add a Lookup Field (see instructions at [[Lookup#Add_a_Lookup_Field|Add a Lookup Field]]). Use the following parameters, and click the [Save] button to save your changes.
#:;Label:Customer
#:;Display Type:Lookup
#:;Object Name:Customer Β 
#:;Field Name: The field for the lookup
#To select the Customer fields to be available for lookup:
#*Click the Fields tab to open the fields list
#*Select the ''Customer '' field
#:*In the Update Custom Field window, select the desired fields
#::[[Image:lookupderived.gif|none|thumb]]
#*Click the [Save] button to save your changes
#To add Lookup-Derived Fields to the Section
#*From the [[Elements Sidebar]], click the ''Pick Existing'' tab to see the list of Customer fields available
#*Click and Drag the fields from the list into the desired section
#*Arrange the fields as desired
#*Click the [Save Changes] button to save your changes
#From the Customer object, add an order, which adds a new record to the ''Order information'' section
:In the Related Information section of the Customer Object, see the orders listed:
::[[Image:relatedcontact.gif|none|thumb|Order Information in the Customer Object]]
:Open an order to see the Lookup-Derived Fields
::[[Image:displaylookupfield.gif|none|thumb|Lookup-Derived Fields]]

Latest revision as of 18:41, 14 May 2013

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.