Show/Hide Toolbars

Lookup tables provide options in List fields of TeamConnect. Each option in a List field is a lookup table item. TeamConnect has two types of lookup tables:

System lookup tables that TeamConnect includes by default. You can modify them by adding and removing items, but you cannot delete them.

Custom lookup tables that you can create as custom fields. Unlike system lookup tables, you can delete custom lookup tables. However, determine whether other design components are dependent on the custom lookup table before deleting it.

Because items in a lookup table have hierarchical relationships between them, you can use full tree positions to uniquely identify all lookup table items. Tree positions for system lookup tables and custom lookup tables are different.

Lookup Tables in the API

In the API, you represent lookup tables and their items with the following interfaces:

LookupItemService—Includes methods that you use to return information about lookup tables and items. For example, you can use the getCustomLookupItems() method to retrieve a list of items in a custom lookup table:

lookupItemService.getCustomLookupItems("CODE");

Note: Use the following code to access LookupItemService: LookupItemService lookupItemService = platform.getLookupItemService();

LookupItem—Includes methods for retrieving information about lookup table items. For example, the following code uses the getStoredValue() method to retrieve the stored value of a lookup table item:

contact.getLookupFieldValue("categoryFullTreePosition", "fieldName").getStoredValue();

EnterpriseEntity—Includes methods that system objects and other interfaces extend. For example, you can use the getLookupFieldValue() method with the Contact model interface to return the value for a custom lookup field:

contact.getLookupFieldValue(String treePosition, String fieldName);

LookupItemService Interface

Most LookupItemService methods return information about the following types of lookup tables and lookup table items:

System lookup tables—You can retrieve all system lookup tables. Each system lookup table in TeamConnect has a LookupItemService method. For example, use lookupItemService.getContactPhoneNumberTypes() to return a list of the lookup table items for the phone number field in a contact.

Custom lookup tables—You can retrieve a custom lookup table and item. getCustomLookupItemForTreePostion() returns one item in a lookup table, and getCustomLookupItems() returns the list of items in a custom lookup table.

Currency—You can retrieve and update the currency lookup table. getCurrencyItemList() returns the list of currencies in the lookup table, and updateCurrencyRates() adds a currency entry to the lookup table.

Expenses—You can retrieve information about an expense category. readLineItemExpenseCode() returns an item in the expense category lookup table, and readLineItemExpenseUnitPrice() and readExpenseRateScaleValue() return rates and units associated with a category.

Document types—You can retrieve document types. For example, getAllDocumentTypes() returns the list of document types in a lookup table.