Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Related lists appear at the bottom of forms and display contain records in from the tables related to the current record. For example, a Table (sys_db_tablean Employee (employee) record contains the Column User Role related list. It displays records from the Column User Roles (sys_user_dbhas_columnrole) table related to the current record.

There are two types of related lists: referenced and synthetic.

  • Referenced related lists are related lists which have a direct reference to another table through the sys_id ID of the current record. For example, a record in the Table A contains ID the ID of the record from the Table B, then the referenced record in the Table B will have a related list with the record from the Table A in it. This connection is provided by the Reference, List, and Document ID column types.
  • Synthetic Scripted related lists are lists that do not have direct references to each other. See the Scripted Related Lists section of this article.

In related lists, users can view and edit information like in any other list, and administrators can configure their appearance on forms by configuring Form Layoutthe form layout.

Note

When users do not have access to some records in the Related Lists area, the following message is displayed:  Some entries are hidden by security policy.

Image RemovedImage Added

Info
  • When the new related list is added, the Default list view of the related table is copied and used as a the view of the related list. You can set up the view later.
  • When a child table is created, its form and list views are copied from a the parent table, taking into account views of sections and related lists. You can set up these views later. Refer to See the Form Layout and List Layout articles to learn more.

To narrow the list of records in a related list, use the Condition Builder. Please note, condition builder. Note that the set filters will not be saved as default. To apply a complex a complex filter to a related list, use the scripted related list.

Adding

Add a related list element


Tip

Role required: admin.

To add a related list to a form, please complete the steps below:

  1. Open the form to which you want need to add a related list.
  2. In the hamburger burger menu Image Modified, select Configure → Related Lists → Layout.
  3. Configure sets of related lists by moving the elements in the heapselect

    Section


    Column
    width40%



    Column
    width60%

    The Available box contains a list of related tables you can add to the form.

    The Selected box contains a list of related tables displayed on the form.

    Panel

    Edit the related lists area with the following actions:

    • Move elements by drag-and-dropping dragging them or using the  and  buttons.
    • To remove or add all the fields, click the  or  buttons button.
    • To change the order of the elements, drag -and-drop them to or use the and buttons.
    • To move several scattered elements at once, select them with the Ctrl key pressed and drag -and-drop them from one box to the other.
    • To move several many elements in a row, click on the first and last elements with the Shift key pressed, and drag -and-drop them from one box to another.




  4. Click Save to apply the changes.

The title before the arrow (→) stands for the table storing related records. The title after the arrow (→) stands for the field, referring to the current record. That is, Incident Task→Parent will display records from the Incident Task table which table that have the current record ID in the Parent field.

As in the example, there There may be more than one field in one table: the Change Request (itsm_change_request) table may contain references to the current record in the Caused by Incidentsincidents, Parent, Related Incidentsincidents, and Resolved Incidents incidents columns.

Tip

Related Lists are connected via the sys_id ID of the current record. That is, the condition for the related list is: [Column Name] is [Current record ID]. To set up a connection with more complex field relations and conditions, create a scripted related list.

Creating


Create a

new

record in a related

lists

list


You can create new records related to the current one through related lists. For example, you can create a new change task for a change request record.

Image RemovedImage Added

Tip

The New button is not available for some of the related lists. 

Tooltip
onlyIcontrue
appendIconinfo-filled
linkTextColorblue

The button is displayed on related lists, which logic suggests creation of new records.
For example, you can create a new column through the Columns related list in a table
record. But records in the Approval table cannot be created manually because of the
implemented logic: approvals they are created automatically.


To create a record in a related list, please complete the steps below:

  1. Open the record to which you want to add a related listrecord.
  2. Navigate to In the Related Lists area and open , select the tab you need.
  3. Click New, fill in the fields, and click .
  4. Click Save or Save and Exitexit.
Editing


Edit records in a related

lists

list


You can edit add existing records to the related lists from a list of existing a current record. For example, you can add a user to existing groups:

Tip

The Edit button is not available for some of the related lists. 

Tooltip
onlyIcontrue
appendIconinfo-filled
linkTextColorblue

The button is displayed on related lists , which logic suggests that suggest adding an existing record to the current record.
For example, you can add a user criterion to a user record through the User Criteria related list. But
connecting a user role is prohibited because of the logic on in the User Role table: its records are created
for each user individually.


To edit records in a related list,  please complete the steps below:

  1. Open the record to which you want to add a related listrecord.
  2. Navigate to In the Related Lists area and open , select the tab you need.
  3. Click the Edit button.
  4. Using a heapselect form, select the records to bind with the current record.
  5. Click Save.

Scripted

Related Lists 

related lists 
Anchor
scripted related lists
scripted related lists


Scripted related lists are different from referenced related lists – their connection is synthetic and provided by the script. That is, you can add relations between tables which do not reference one another in the Reference, List or Document ID column types. These lists can be configured via the Scripted Related Lists (sys_related_list_script) table.

To set up a scripted related list, please complete the steps below:

  1. Navigate to System Definition → Settings → Scripted Related Lists.
  2. Click New and fill in the form.
  3. Click Save or Save and Exitexit to apply the changes.

Scripted Related List form fields

FieldMandatoryDescription
NameYRelationship Specify the relationship name displayed in the list.
Apply toYSpecify the table on the forms of which this form this related list will be displayed.
Query fromYSpecify the table containing the source records for this list.
Query withYIn this field, you can put down a script specifying the records to include from the specified table processed by this relationship

In your scripts, you are free to use the current and parent objects. The main purpose of this script is to generate a query that will be applied to the table specified in the Query Fromfrom field.

Image Modified


Info
  1. The current object is an object of the table where the query is created (the table specified in the Query from field).
  2. The parent object is a reference to the object of a table specified in the Apply to field.

In other words, the parent object is a record form specified in the Apply to field, and a current object is a list from a table specified in the Query from field.

You can use any SimpleRecord Server-Side methods as directives in the current and parent objects.


Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse

.

PanelForm Layout