Skip to main content

Create an SM Material Item Lookup

Modified: 23 Sep 2026 Vista Field Service

Create a custom lookup that limits material work completed items and on-hand quantities based on the inventory location.

The following is just one example of how to write a custom lookup. If you use this lookup example, only the material items located at the selected inventory location, and their on-hand quantities at that location, will display in the Material dropdown when a technician adds an inventory work completed item to a scope.
  1. In the web portal, select Admin > Manage Lookups.
  2. In Select a Lookup, select Add New Lookup.
  3. In the SQL Choices Override box, enter the following:
    Note: Changes made on the Manage Lookups page are saved automatically.
    Select
    Cast(kHQMT.KeyID as varchar(20)) as ChoiceShortName,
    Cast(kINMT.Material as varchar(20)) + ' - '+ kHQMT.Description + ' ( '+format(kINMT.OnHand,'N0') +' )' as ChoiceLongName
    From kHQMT
    JOIN kINMT ON kINMT.MatlGroup = kHQMT.MatlGroup AND kINMT.Material = kHQMT.Material and kINMT.Active = 'Y'
    JOIN kINLM ON kINMT.INCo = kINLM.INCo AND kINMT.Loc = kINLM.Loc
    Where kINLM.KeyID=@INLMKeyID
  4. Select Evaluate Lookup to test the new lookup.
    If any errors are found, an error message will display at the bottom of the page. If no errors are found, no messages will display.
  5. Select the Active check box at the top of the page.
Submit

Table of Contents