unit 4: linked fields - agiloft• as we learned in unit 3, linked fields draw their data from...

51
Unit 4: Linked Fields

Upload: others

Post on 16-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Unit 4: Linked Fields

Page 2: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Questions Covered

• What are linked fields?

• What are the different ways to link and display data from one table in another table?

• Which data types should we use when we want to show person records within another table?

• What are the different options for looking up, filtering, using default values, and displaying linked data?

• What other complex data types can be used to calculate results within a record or for related records?

2

Page 3: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Linked Fields Unit Overview

• In the previous unit, we learned about local fields. In this unit, we will look at fields that draw their values from one or more records in another table.

• We will be learning about various linked field data types and creating fields in our practice system as we progress through the unit.

• Most of the examples we create will be in the Task table we created in Unit 1.

• If you get stuck, refer to the Task table in your Training Sample KB to see how a particular field is built and configured.

3

Page 4: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

What are Linked Fields?

• As we learned in Unit 3, linked fields draw their data from records in another table.

• There are several different data types that create a relationship, or link, between values held in one table and values displayed in another table.

• We will be going over each of these data types over the course of this unit.

4

Page 5: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Watch this Video!

• Because linked fields can be tricky to understand and difficult to explain without visual examples, we strongly advise that you watch the following video overview before proceeding.

5

Page 6: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Linked Fields Example

• As you should now understand, there are many situations where you want to pull data from one table into another table. Let’s look at contract management for a typical example:

You may have a Vendor table which holds records for each of your vendors, a People table which holds the people at your company as well as vendor and outside contacts, and a Contract table holding information about your contracts.

Within the contract record, you will typically pull in and display fields from the vendor record for the contract’s vendor (Vendor Name, Vendor Number, Vendor Address etc.), as well as the names and email addresses of the main vendor people, and your own employee people who are responsible for the contract.

Within the vendor record, you might show a Related Table of all contracts for that vendor, as well as a Related Table of all vendor people.

These are the kinds of links and relationships we will learn about in this unit.

6

Page 7: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Data Types are Important

Reminder: Be careful to choose the correct data type when working with linked fields. You cannot change the data type for a field once you have created it!

• Some common errors:

Using a Short Text field when it is better to use a linked field (for instance, to hold the name of a user who has a contact record in the system).

Using a Link to single field from other table when you think you just need one field and are only linking to one record, instead of a Link to selected fields from other table (inevitably, you end up wanting more than one field from the source table and then have to start over).

Also be careful with the Mapping tab in the Linked Field wizard – if you change your mind about whether you are linking to one or many records after saving the field, you will have to start over.

7

Page 8: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Linked Field Data Types

• There are several kinds of links that can be created to fields and records in other tables:

Link to single field from other table*

Link to selected fields from other table*

Link to all fields from other table

Link to single field from multiple tables

Related Table*

Calculation on multiple linked records*

Embedded Search Result

Communications Search Result

Calculated Result* - not really a linked data type, but can use linked data.

In this unit, we will be creating fields for each of the data types with a red asterisk*

The bold faced data types are the most commonly used

8

Page 9: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Special Field Wizard Tabs

• There are special tabs and options for each of the Linked Field wizards. By far, the most common linked data type is the Link to selected fields from other table. Below is an overview of the wizard tabs for this data type. We will discuss each in turn in the next slides:

Table: Used to select the source table from which the data will be pulled.

Mapping: Defines whether you are linking to one record (default) or multiple records and whether the link requires a source record.

Fields: Defines the fields from the source table to be included and their new labels.

Permissions: Has the standard options, but once you have saved the field, you can no longer edit them from here.

Options: Has some special default values and saved search options to allow you to filter the records from which the values might be pulled.

Display: Defines the display characteristics , and the way the lookup works and displays found records.

9

Page 10: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Table Tab for Link to Selected Fields

• The Table tab is where the source table is selected. If choosing a table that has sub-tables, check the box to Include fields from sub-tables if you want to use any of those fields in the linked set.

• It is possible to pull data in from an external database by selecting the Table from another database option. There is some additional setup needed in the configuration file to enable this option.

• Data pulled from an external database is view-only. External fields can be displayed within the Agiloft record and used in searches and reports.

• The Admin notes box is a good place to put notes about the field and what it is for, as well as to indicate any filters or special parameters, such as visibility dependence.

10

Page 11: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Mapping Tab for Link to Selected Fields

• The Mapping tab has critical options for how the field set will

function.

• Under Allow the imported fields to hold multiple values from

the [Table] table?, select the radio button next to No if you are

linking to one record, or Yes, fast search if you are linking to

multiple records. For instance, will the fields hold information

from only one vendor record, or are you selecting multiple

contacts you want to cc on emails? Think carefully, because

once the field is saved you cannot change this value.

• Allow entries not in source table permits a user to type into the linked fields and the system will

allow you to save the values even if there is no matching source record.

• Automatically Update in the background keeps the current record up-to-date with updated values in

the source record (e.g. if a person’s last name changes it will propagate). Usually, this is desirable,

but not always - suppose you pull in the price paid for an asset from a price list that later changes –

you probably want to preserve the original price paid.

11

Page 12: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Fields Tab for Link to Selected Fields

• The Fields tab displays all the fields in the source table.

• It is where you select the fields to be included from the source table in the linked set.

• You will almost always want to rename the field for the current context.

Not all fields selected need to be displayed to users – some might be included for rules to use without anyone actually seeing them.

12

Page 13: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Options Tab for Link to Selected Fields

• The Options tab is critical to determining how a linked field set will function.

• You can define a default record based on a simple matching value.

Example: You can have the system choose the right linked company record based on a match of the Company Name (in the Company table) to the Customer Company (in the support case).

• You can also pull in the first or all records found as a result of a sorted saved search.

• You can use a default value for linked fields based on the person who did something, e.g. changed a field value from x to y, created or last modified a record.

• You can filter the source records that can be used based on a saved search that matches some field value in the source table to a field value in the current record.

Example: To choose a vendor Location in a contract, use a link to the Locations table filtered to those Locations in which the Vendor Name matches the Contract Vendor Name.

• This is also where you define whether the linked field set is required, deletable, or visibility dependent on some other field.

13

Page 14: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Display Types for Linked Fields

• On the Display tab you will select the displaytype to use for each linked field.

• The following display types are possible:

Hyperlinked Box with lookup and Hyperlinked View only provide a hyperlink to go to the source record.

List of Values shows a drop-down list with a value for each record in the other table. This display type should only be used when the field has unique values in the other table. Otherwise, you will see a list with duplicate values.

Source field display with lookup is used for choice fields in the source table. It shows the list of values with a lookup to filter the records by a selected value.

View only source field display is usually used for attached files or images.

Auto shows a List of Values until 50 records exist and then switches to Hyperlinked Box with lookup.

It is critical that you choose a reasonable display type. If your fields allow non-source values, you will usually need a Plain text box with lookup, or Box only so the user can enter text.

14

Page 15: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Additional Display Tab Options for Linked Fields

• Sometimes to get a well aligned display of linked fields on the layout, it is necessary to edit the display length of a linked field to a smaller value than in its source table. This is because the layout reserves extra space for an unfilled linked field based on the maximum length of the source field.

• This is adjusted by clicking the Edit icon next to the list of fields:

• Clicking the Edit icon brings up the Display Options tab for the field, where you can adjust the length of the field. You can also add an instructional popup or input instruction for the field here.

• The Display tab also allows you to define the table view used to display the search results when looking up a linked record and choose whether to search by string or context.

It is helpful to choose String under Default searchbecause a string search finds word fragments, as well as whole words, and is therefore more likely to produce the results that you’re looking for.

15

Page 16: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Best Practices for Linked Fields

• On the Fields tab you will select the fields to be included in the linked set. It is important to re-label the linked fields to indicate their role in the current table.

Example: If you pull in the name of the person who will be assigned to a record, the source table field name is Full Name. In this table you will re-label that value to Assigned Person.

• It can be helpful when relabeling to include the source table in the label, e.g. Vendor Phone,Vendor Name, Vendor Status, etc. so that when you are laying out the fields, searching, or adding fields to a table view, you can recognize which table they are coming from.

• It is good practice to include a field with unique values in the linked set to ensure that you can identify the specific source record if needed. Typically the ID field is included.

• It is useful to display at least one field in the linked set as a hyperlink so users can navigate directly to the source record to see more information.

Access to linked fields is controlled by a combination of field-level permissions in the current table, the display type selected for the linked field, and record and field permissions on the records in the source table. This can be tricky to understand but gives great flexibility.

16

Page 17: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Link to Single Field from Other Table

• This data type pulls in the value from just one field in another table.

Example: Company Main Contact

We advise that you do not use this data type when pulling in a single record, because you invariably find you want to add more fields later. For instance, in the above example, you may later decide you want to show the main contact’s email and phone number too, and you cannot do it without starting over with a Link to selected fieldsdata type.

• The main use for this data type is when you want to pull in one field from multiple records in the other table, displayed as a multi-select lookup or as checkboxes.

Example: In the Contracts table you might have a field titled Internal CCs where you can select the Full Name of one or more employees who should be emailed about updates.

Example: In the Company table you might have a field called Products Purchased, showing checkboxes with the Product Names of your products that can be checked to show which products a customer has purchased.

17

Page 18: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Link to Single Field from Other Table

• We are going to add a CC List field so when a task is assigned or completed, any emails sent to the Assigned Person can also be cc’d to other interested parties.

• Create a Link to single field from other table, and on the Table tab, under the text Select table, choose the Employee table from the drop-down menu. This is the table from which we are getting data to display.

• On the Mapping tab, choose the option Yes, fast search which will allow the linked field to hold multiple values from the Employee table.

• On the Fields tab, click the radio button next to Full Name and change the Field label to “CC List.” Click the Next button to navigate to the next tab.

• On the Display tab, set the input aid to be Multiple value box with popup selection list. Check the box to Show values as hyperlinks to source record.

• Click Finish to save your field.

Practice

18

Page 19: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Don’t Forget to Check Your Work

• As you create the fields for the practice examples, it is a good idea to add them to the layout and preview them to be sure they look correct. To do this:

Go to the Layout tab of the Table wizard.

Drag and drop the field(s) onto the layout.

Click the Preview button to check your work.

• For this training, we recommend doing this after every one or two fields are added.

• If you are not sure if your field is correct, you can always check the Training Sample KB.

Most linked fields use a saved search to filter the available records – we will come back and add searches when we learn about searching in Unit 5. For now, all records will be available in the linked fields you create.

19

Page 20: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Link to All Fields from Other Table

• When you select this data type, all fields from the source table are included in the linked set, except for those with a data type of History or Email History, and any fields linked to the source table.

• If you need to exclude some fields from the Link to all fields from other table, you can do so on the Fields tab.

• If new fields are added to source table they are automatically added to the target field set.

• We do not generally use this data type.

20

Page 21: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Link to Selected Fields from Other Table

• This data type allows one or more fields from another table to be pulled into the current record as a set of fields representing a record in the other table.

Example: Requester Name, Requester Email, Requester Phone is a linked set populated with the Full Name, Email, and Phone fields from the user record of the person who creates a support request.

Example: Project Name, Project Category, Project Type, Project Manager is a linked set populated with fields from the Project table showing the details for a project linked to a task.

Example: Assigned Team is a link to the Team Name field in the Team table used to represent the team assigned to a task.

Example: Assigned Person, Assignee Manager are the Full Name and Manager Name fields from the employee record of the person assigned to a task.

This is the most commonly used linked data type.

21

Page 22: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

One or Many Records?

• The Link to selected fields from other table data type is really like two different data types, because its behavior is different based on the selection made on the Mapping tab.

• If the field is defined to hold just one record, each field in the set is individually added to the layout, as shown in the first image to the right.

• But if, on the Mapping tab, you set the value for Allow the imported fields to hold multiple values to one of the “Yes” values, the display and behavior is quite different. Now, instead of individual fields, the linked records are shown in an embedded table within the record, with a table view and action bar. See the second image for an example.

22

Page 23: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Link to Selected Fields—Allow Non-Source Values

• On the Mapping tab, the option to Allow entries not in source table allows data to be entered that does not match a source record (see the contact information fields below):

• We refer to this as a “loose link” as opposed to a “strict link.” A user types data into one of the fields and uses the lookup - if a match is found, the record can be imported and the other fields auto-populated, but if no match exists, the values can simply be typed into the fields.

• If you select this option, you will generally also select the Do not update option in the third section of the Mapping tab. These two options go together. In a strict linked field, automatically update should generally be selected.

23

Page 24: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Link to Selected Fields from Other Table

• We are going to create a link to a project record within the Tasks table.

• In the Tasks table, create a Link to selected fields from other table, and on the Table tab, under the text Select table, choose the Project table from the drop-down menu.

• Leave all options as their default values on the Mapping tab.

• On the Fields tab, under the Field name column, is a list of all fields in the Project table.

• Checking a box next to a field includes that field in our linked set. Once you’ve selected a field to include in the linked set, the input box to the right under the Field label column becomes editable. The text typed into this box will become the field label in the Tasks table.

• Below are the fields in the Project table to include in the linked set and their new names:

ID: Project ID

Project Category: Project Category

Project Manager: Project Manager

Project Name: Project Name

Status: Project Status

Practice

24

Page 25: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Link to Selected Fields from Other Table

• On the Options tab, make the visibility of the field conditional on the field Related To containing the value Project.

• On the Display tab, click on the Edit icon to the right of the Project Name drop-down menu to bring up a display settings window and set the width of the input field to 50 characters.

Click Finish to return to the Field wizard.

• Click the drop-down menu next to each field to choose the input aid and set them as follows (note that the field names are those from the source table):

ID: Hyperlinked Box with lookup

Project Category: Source field display with lookup

Project Manager: Hyperlinked Box with lookup

Project Name: List of Values

Status: Hyperlinked view only

• Click Finish to save the field.

Practice

25

Page 26: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Link to Selected Fields—Assigned Team

• Now we are going to create a link to the Team table allowing us to assign a task to a team.

• Create a new Link to selected fields from other table.

• On the Table tab, under the text, Selected Table, choose the Team table.

• On the Fields tab, select the fields in the Team table to include in the linked set and rename them as follows:

Team Leader: Assigned Team Leader

Team Name: Assigned Team

• Click Next twice to navigate to the Options tab, leave the default setting of no default value.

• On the Display tab, choose a List of Values display for the Assigned Team, and Hyperlinked view only for the Team Leader.

• Click Finish to save your field.

Practice

26

Page 27: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Link to Selected Fields—Assigned Person

• Now we are going to create a link to the People table so we can assign the task to a person.

• Create a Link to selected fields from other table, and on the Table tab, under the text Select table, choose the People table from the drop-down menu. Check the box to include fields from sub-tables.

• On the Fields tab, choose the following fields to include in the linked set and rename them as follows:

Full Name: Assigned Person

ID: Assignee ID

Manager Name: Assignee Manager

• On the Options tab, set the default value to the User who creates the Task.

• On the Display tab, choose a List of Values display for the Full Name (Assigned to), and Hyperlinked view only for the other two fields. Click the Edit icon next to the Manager Name field to set the display length to 25 characters.

• Click Finish to save your field.

Practice

27

Page 28: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Link to Selected Field with Multiple Values

• Now we are going to look at the same data type when it holds multiple values.

• Let’s suppose an IT task relates to multiple assets. If we just want to see the Asset Names, we can use a Link to Single Field from Other Table with multiple values enabled. But if we want to see more information for each asset within the task, we would use the Link to Selected Fields from other table instead.

• As soon as we choose to enable multiple values, the field will be displayed as an embedded table.

• We still select specific fields on the Fields tab, but they do not affect the display – they define which fields show up as searchable in the search menu and selectable in a table view.

Fields should always be renamed when using this data type so they don’t duplicate existing fields.

28

Page 29: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Link to Selected Fields—Assets

• In the Tasks table, create a new field of type Link to selected fields from other table.

• Under Select Table, choose the Asset table.

• On the Mapping tab, choose Yes, fast search for the first option.

• On the Fields tab, enter “Related Assets” as the Table Label. Choose Asset Name, Asset Type and ID and rename them to “Asset Names,” “Asset Types,” and “Asset IDs.”

• On the Display tab, set the Default search to use String on All text fields, and leave the default view.

• From the dropdown menu for action bars displayed above the table, choose the Related Table Action Bar.

• Choose the option to Left justify the input box and click Finish to save the field.

• Add the field to a tab on the layout and try it out. Note that to look up an asset record, you use the magnifying glass lookup. If you click New to add an asset record, it will be added to the embedded table as well.

Practice

29

Page 30: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Link to Single Field from Multiple Tables

• This field type links to a selected field from each of two or more tables.

Example: Instead of using two separate Assigned Team and Assigned Person fields, you could have a field called Assigned To which could hold either a Team Name or a Person’s Name by drawing its values from the Teams: Team Name and the People: Full Name fields.

• This data type can occasionally be useful to link a record to another record in one of several other tables. For instance you could have a link to the ID field from two or three tables and use it as a hyperlink to get to the correct related record.

• It is possible to construct a field of this type using different data types, for example an Integer, a Text field and a Floating Point field. In such a case, it is represented as a text field.

30

Page 31: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Related Table

• Related Tables use the relationship created by one of the linked data types we have just discussed to show the relationship from the other direction. It is used to display all records (or a filtered set) linked from another table to the current record.

For example, we just created Assigned Person, linked to the Full Name field in the People table. Now we can add a Related Table to the People table that shows all the task records to which a given person is assigned.

Example: In a company record, a Contracts related table shows all contracts that have that Company value in the Vendor Name field. And a Support Cases related table shows all support cases that are linked to that company.

Example: Suppose 10 People have a value of “Agiloft” in their linked Company Name field. In the Agiloft record in the Company table, a Related Table of People will show those 10 people.

31

Page 32: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Related Table Features

• Related Tables are displayed as an embedded table with options for using a custom table view and/or action bar.

• A link in the opposite direction must be created before setting up the Related Table.

• Creating a new item from the Related Table automatically links to the current record.

Example: If, while editing a company record, I click the New menu button on a People related table to create a new person, the linked Company field will be set automatically to the company I am editing.

• Related Tables can be filtered to show only some of the linked records. For example, a filter might be applied to the People related table within the company record to show only the people whose Status is Active.

This is accomplished on the Permissions tab under Additional Filters and is done through a saved search. We will cover saved searches in Unit 5.

• More than one Related Table can be shown within the same record using different filters. For instance in the Projects table, you might display a table of Open Tasks and another table of Completed Tasks, both of which are linked to the current project.

32

Page 33: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Related Table

• Now we’re going to show task records within the Projects table, based on the relationship we just created, by creating a Related Table.

• Switch to the Projects table by clicking Setup Projects in the left pane (you may need to click the down arrow to the left of the table name to make Setup appear). Navigate to the Fields tab and create a new Related Table.

• On the General tab, under the text Table/Relationship is a list of all linked field sets linked to the Projects table. Select the relationship that is labeled Task, below which are the fields in the linked set we created earlier.

Always rename this kind of field: scroll to the bottom of the General tab and label your table “Tasks” in the Field Label field.

• On the Display tab, select the option to Display Tasks using the user’s default view and check the box to Left justify the input box... Related Tables generally look best if they are left justified rather than indented by their field label.

• Click Finish to save your field.

Practice

33

Page 34: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Calculation on Multiple Linked Records

• This data type is used to automate many business processes.

• It can run on a Related Table or a multi-value-enabled Link to Single Field or Link to Selected Fields from another Table.

• It either counts the related records or calculates the sum, average, minimum, maximum, or standard deviation of a specific field in the related records.

• The calculation updates automatically in the background when records in the Related Table or Linked Field Set are added, edited, or deleted.

• Its most common uses are:

To sum a field, such as Time Spent, in a table of Time Entries related to a Support Case or Project. Or Total Cost for line items in an Invoice or PO.

To count the number of records meeting some criteria so that value can be compared to another field counting the total number of records, e.g. Number of Tasks and Number of Completed Tasks.

34

Page 35: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Calculation on Multiple Linked Records in Automation

• The history engine captures changes to fields of this type as an API update (more on that later when we cover rules) that can trigger rules when specific criteria are met.

• Multiple Calculation fields are often created using different filters on the same set of linked records.

Example: Total Number of Tasks (counts the number of task records within a project) and Number of Completed Tasks (counts the number of task records within a project with a Statusof Closed).

• Often two such fields are compared to know when a process is complete. For example, in the scenario above, when the Number of Completed Tasks changes, the system can check if the Total Number of Tasks = the Number of Completed Tasks, and if so, can automatically set the Status of the project to Completed.

35

Page 36: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Calculation on Multiple Linked Records

• Let’s create a field in the Projects table based on the Tasks related table we just created.

• Go to Setup Projects and click on the Fields tab. Create a new Calculation on Multiple Linked Records field.

• On the General tab, name the field: “Number of Tasks.”

For Choose the field you want to calculate select the Related Table: Tasks.

• On the Options tab, leave the default option for Count. Choose to Interpret null as zero.

• On the Display tab, change the option Always show 4 decimal digits to Do not pad with zeroes.

• Click Finish to save your field.

• Edit the layout in the Projects table to add a tab called Tasks and put the Tasks related table and Number of Tasks on the new tab. Edit an existing project record and create a new task for it from the Tasks related table. See the result.

Practice

36

Page 37: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Creating Multi-to-Multi Relationships

• Suppose you need a multi-to-multi relationship:

An asset may have multiple software applications.

A software application may be installed on multiple assets.

• Process:

First create a Link to selected fields from other table with multiple values enabled in one table.

Then create a Related Table in the other table based on that relationship.

Result: The display looks the same in both tables, though created by different data types.

Items can be created in the related table from either end with links created automatically.

37

Page 38: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Multi-to-Multi Example

Software Table View:

Asset Table View:

38

Page 39: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Considerations for Multi-to-Multi Design

• Deciding which table should have the Link to selected fields from other table and which should have the Related Table can be a bit tricky.

• The Link to selected fields table is usually populated by a user manually selecting records to link, while the Related Table automatically displays a relationship that has already been created.

• However, you can use a default value action to auto-populate a Link to selected fields with values based on the result of a saved search, and you cannot do that with a Related Table.

• Generally it is best to use the Link to selected fields to pull in the table holding records that already exist that you want to link to a new record. For instance, if you add new assets more often than new software applications, you would use a Link to selected fields in the Asset table to select the software applications. When you add a new asset, you would select the software applications, and now in any particular Software Application’s related table, you would automatically see the new asset included.

• For a more in-depth analysis of multi-to-multi design, please refer our design article on creating many-to-many relationships.

39

Page 40: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Embedded Search Result

• An Embedded Search Result displays the results of a saved search, typically on another table, as an embedded table in the current record.

Example: All Products Purchased by the Submitter’s Company in a support case; All Assets owned by a particular user in a support case.

• Comments:

Shows an embedded table of records that are related to this record, usually based on a matching field.

No direct link relationship between the two tables is required.

Example: Assets may have a link to users, but no link to a support case. They may still be shown in the support case based on the user match.

Shown as an embedded table, but if a new record is created through the embedded table, unlike in a Related Table, no relationship to the current record is created, as there is no linked relationship between the two tables.

40

Page 41: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Communications Search Result

• This is a special case of an Embedded Search Result with special menu items to reply to and forward emails.

• Used to automatically show an embedded table of communications sent to or from the current record.

By default, when an email is sent from a table record, both Linked Table and Linked ID fields are populated to link it to that record.

• This field is created automatically for new tables with the default filter, which shows all communications in which the Linked Table and Linked ID match the current record.

• You can edit the search filter on the field to broaden or restrict which records are shown. For instance, in the Companies table you may want to see all emails sent to or from anyone at that company, not just emails specifically linked to the company record. This can be accomplished by modifying the filter.

41

Page 42: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Calculated Result

• A Calculated Result field is a numeric field defined as a formula that uses other numeric fields (local or linked fields) as elements of the formula. It is not actually linked to anything but it refreshes based on the underlying field values.

Example: A Billable Amount field defined as Billable Hours * Billable Rate in a Time Entry table.

• Comments:

Outputs numeric values and requires numeric inputs. Each of the fields used in the formula must be numeric.

Includes standard numeric display settings with a few extra options unique to the field.

Automatically updates when the input fields change.

Can wait to produce a result until all fields have a value.

Users cannot edit directly regardless of permissions.

42

Page 43: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create a Calculated Result Field

• Return to the Tasks table, create a new Calculated Result field and name it “Billable Amount.”

• On the Options tab, the top input box is where you enter the formula for the field. Use Formula Help to find the fields below and click on them to populate them into the formula box.

• Click on Formula Help and then navigate to the Fields tab.

Rearrange so the field reads: $billable_hours * $billable_rate

• Change the default to Round to 2 decimal digits instead of 4.

• Select the option Show error message and prevent record saving, and Make the visibility of this field conditional on Billable containing the value Yes.

• On the Display tab, choose to display a currency symbol and enter “$” in the input box. Choose the sub-option to display the symbol before the number.

• Set the option When displaying decimals to Always show 2 decimal digits.

• Click Finish to save your field.

Practice

43

Page 44: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

WMI (Windows Management Instrumental)

• Enables the capture of hardware and software information from a Windows based user that can be accessed through the WMI interface.

• The implementation uses ActiveX controls for accessing the WMI classes and properties. Your browser must support ActiveX technology to access the WMI properties. Some browsers require plugins to support ActiveX controls.

• To set up a WMI field, go to Setup >Tables > [Select Table] > Edit > Fields >New > Windows Management Instrumentation field. Fill out the wizard to choose the classes and options needed.

• The sample knowledgebase includes a table named WMI Sample that contains common WMI field definitions and these can be copied into your current table using Setup >Tables > [Select Table] > Edit > Fields >New > Copy Fields> Windows Management Instrumentation.

If WMI fields are hidden by dependency conditions, they do not run the corresponding Active X components to poll the user's machine until they become visible.

44

Page 45: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Finishing the Tasks Table—Print your Field List

• Now that you’ve created your fields in the Tasks table, let’s print them out.

• Go to the Fields tab of the Tasks table wizard and click the button.

• Choose the columns to include. We usually do not include Field Name, Field DB Name, Layouts, Date updated, or Updated by.

• Click Finish to see the result. This is a quick way to see additional information about your fields without editing them.

• This printout can be imported into a Word document:

Use the browser to save the file as an html file.

Open Word and open the html file.

Use your mouse to copy just the text in the table without copying the whole table.

In another Word file, paste the text. Then apply your default table style, and it will look like the rest of your tables.

Practice

45

Page 46: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Finishing the Tasks Table—Adjust the Layout

• Spend some time now adjusting the layout for the Task table that reflects the principles you learned in the previous unit about layout design.

• Feel free to play with the layout editor, changing the alignment, adding text, etc.

• Preview your layout until you are satisfied with it.

• It is a good idea to create a History tab so that users can see how the record has changed over time.

• To see an example of a reasonable layout, view the Sample KB layout.

Practice

46

Page 47: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Create an Action Bar for the Tasks Table

• We generally show a different action bar for a Related Table, e.g. when tasks are displayed within the project record. A good related table action bar will probably not include Search, and may omit some of the other options that are on the main action bar.

• Design an action bar in the Task table for that purpose and name it. Go to the Projects table > Setup Projects > Fields, and edit the Tasks Related Table field you created earlier, and on the Display tab, select the action bar you just created.

• Test it out by creating a task linked to a project and viewing that task within the project record.

Practice

47

Page 48: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Update Permissions—Record Ownership

• Now that we have added the Assigned Person field, let’s update the field that determines who owns task records.

• We would like the Assigned Person to own the task, rather than the person who created it. Assigned Person derives from the Full Name field so it could be matched to that field. However, this is a bit risky as there may be multiple people in the company with the same name. It is safer to use Assignee ID matches ID, as that is definitely unique.

• This is one reason we like to include a unique field in a linked set, especially when users are involved. For users we can include Login or ID, as both fields are unique in that table.

Practice

48

Page 49: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Update the Default View for the Tasks Table

• Now update the Default View you created earlier for the users of the Task table to use some of the new fields.

• Include the ID, Date Due, Assigned Person and/or Assigned Team,Task Summary, Related To, Billable, Status and any other fields you want.

• Add row coloring based on the Status of the task so you can easily distinguish the tasks that are not completed from those that are done.

• Create a new record to test your layout, fields, and the view and see if you need any adjustments.

Practice

49

Page 50: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Test What You Have Built

• Now create some task records and try out all the fields you have added to make sure their length works and the options are correct.

• Be sure to check the functions of the Billable Amount and the linked fields. Link to some assets and see how they look.

• You might practice further by adding another Calculation on Multiple Linked Records field in the Projects table for Total Billable Amount that sums that field in the Related Table: Tasks.

• Then test it to see if it performs correctly.

• Experiment with other layouts, adding text headers or input instructions, and so on.

• You might also look at the Tasks table in the Training Sample KB.

Practice

50

Page 51: Unit 4: Linked Fields - Agiloft• As we learned in Unit 3, linked fields draw their data from records in another table. • There are several different data types that create a relationship,

Summary and Conclusion

• We have learned how the different linked field data types are configured and what they are used for.

• We have seen several examples of linked fields and embedded tables.

• We have learned about two kinds of calculation fields - one that uses a formula for fields within the table and one that runs calculations on multiple linked records.

• We have created several linked fields and tables.

• We have not yet added filters to linked fields, because we need to learn about searching first.

51