Create an SM Standard Item Lookup

Create a custom lookup that limits miscellaneous work completed items based on the rate template assigned to the SM Service Site.

The following is just one example of how to write a custom lookup. If you use this lookup example, only standard items with rates assigned in the rate template will display in the Standard Item drop-down when a technician adds a miscellaneous 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 kSMStandardItem.SMStandardItemID ChoiceShortName
    kSMStandardItem.[Description] ChoiceLongName
    FROM kSMEntity
    INNER JOIN kSMWorkOrderScope
    ON kSMEntity.SMCo = kSMWorkOrderScope.SMCo
    AND kSMWorkOrderScope.RateTemplate = kSMEntity.RateTemplate
    INNER JOIN kSMRateOverrideStandardItem
    ON kSMEntity.SMCo = kSMRateOverrideStandardItem.SMCo
    AND kSMEntity.EntitySeq =
    INNER JOIN kSMStandardItem
    ON kSMRateOverrideStandardItem.SMCo = kSMStandardItem.SMCo
    AND kSMRateOverrideStandardItem.StandardItem = 
    INNER JOIN kSMRateTemplate
    ON kSMWorkOrderScope.SMCo = kSMRateTemplate.SMCo
    AND kSMWorkOrderScope.RateTemplate = 
    WHERE kSMWorkOrderScope.SMWorkOrderScopeID = @SMWorkOrderScopeID
  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.