Skip to main content

LOVs and Listings

LOVs (Lists of Values) and Listings are data-driven components in tSM that allow users to select or view records from other entities. They are critical for enabling relationships across modules, such as assigning users, linking customers, or displaying related tickets.

These widgets can pull from static data, remote APIs, or entity-based queries, and can be filtered dynamically based on form context.

What is an LOV?

A List of Values (LOV) is typically a dropdown/select widget that presents values from another entity — like Users, Products, or Customers.

FeatureDescription
Widget Typetsm-autocomplete, tsm-customer-lov, etc.
Data SourceConfigured via config.dataSource
Selection ModesSingle / Multi-select
Return Typeid, code, or full object

Example: Customer Selector

"customer": {
  "type": "string",
  "widget": {
    "type": "tsm-customer-lov",
    "config": {
      "dataSource": "CustomerEntity",
      "selectFirstValue": true,
      "showClear": true
    }
  }
}

Common LOV Config Options

FieldPurpose
dataSourceDefines which entity or list to load from
selectPropertyWhat is stored: id, code, or other key
displayFieldWhat to show in the dropdown UI
multiselectAllow multiple selections
defaultFiltersPredefined filters for limiting result scope
selectFirstValueAutomatically choose the first available value

What is a Listing?

A Listing is a tabular widget that displays multiple records from an entity — typically used in detail forms, dashboards, or nested forms.

Widget ExampleUse Case
tsm-ticket-list-widgetShow all related tickets
tsm-user-stock-itemsShow inventory assigned to user
tsm-customer-list-widgetEmbed customer search

Listing Features

  • Search, sort, and filter records

  • Column profiles

  • Bulk actions (in some cases)

  • Read-only or interactive (e.g., row selection)

    Context-Based Filtering (Dynamic Lists)

You can use JEXL expressions to apply filters dynamically based on the current form.

"config": {
  "defaultFilters": [
    {
      "field": "customerId",
      "operator": "eq",
      "value": "${$context.form.customerId}"
    }
  ]
}

This will limit the listing to only rows related to the currently selected customer.

LOV vs. Listing – When to Use What?

Use CaseUse Component
Select one or more entitiesLOV (tsm-autocomplete)
Show related records in a tableListing (tsm-*-list-widget)
Reference-only (read-only data)Listing or Card
Filtered or user-specific viewBoth (via filters)

Performance Considerations

  • Avoid large unfiltered LOVs (use defaultFilters)
  • Listings with too many rows can impact rendering time — paginate if possible
  • Enable lazy loading for remote data sources
  • Use selectFirstValue wisely to reduce required clicks but prevent unintended auto-selection

Pro Tips

  • For LOVs, always specify both selectProperty and displayField
  • For Listings, define a profile to control visible columns and sorting
  • Consider visibility logic for LOVs tied to form state
  • Use readonly mode for Listings if edit isn’t needed