Creating a Metric Instance Database View

Database Views are useful when working with metric instance records. A Metric Instances table does not contain a regular Reference field, but instead a document ID and a Table field. Together, they can point to any record in any table in the system. This flexibility comes with a price: dot-walking is not possible.

So let's use a database view!

  1. Navigate to System Definition > Database Views and click on New. Use the following details:
    • Name: x_hotel_maintenance_metric
    • Label: Maintenance Metric
    • Plural: Maintenance Metrics

Once saved, a related list will be available. This specifies which tables to join together.

  1. Click on New on the View Tables related list and set the following fields. Once done, ...

Get ServiceNow: Building Powerful Workflows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.