Enable Auto Select Cost Codes for EM Work Order When Equipment is Shown in Portal

If you are showing Equipment and Cost Code on Mechanic Work Order lines, the following will allow the Cost Code field to populate automatically after WO item selection in the portal.

To complete this configuration, you will need access to User Database and PR Timecard Entry in Vista, and be a System Admin in the portal.
  1. In Vista, open the UD User Defined Lookups form and copy the existing EMCC lookup. On the Info tab, modify the new lookup as shown below:
    • From
      • EMCC
    • Where
      • EMWI.EMCo = ? and 1 = CASE WHEN ISNULL(?,'-1') = '-1' THEN 1 WHEN EMWI.WorkOrder = ? and EMWI.WOItem = ? THEN 1 ELSE 0 END
    • Join
      • LEFT OUTER JOIN EMWI on EMCC.EMGroup = EMWI.EMGroup and EMCC.CostCode = EMWI.CostCode
    • Group By
      • EMCC.CostCode, EMCC.Description
  2. On the Details tab, add the following:
    • Sequence: 0, ColumnName: 'EMCC.CostCode', ColumnHeading: 'Cost Code', InputType: 0-String, InputLength: 10
    • Sequence: 1, ColumnName: 'EMCC.Description', ColumnHeading: 'Description', InputType: 0-String, InputLength: 30
  3. Configure the lookup in Vista by following the steps below:
    1. Open PR Timecard Entry and select the Field properties on Cost Code.
    2. Select the Lookups tab in the Field Properties window and add the custom lookup created above.
    3. Enter the Parameters with a comma between each entry, as shown in the sample below (29,31,31,32).
    4. Change the Load Sequence # to 0. Ensure that it is the only 0.
    5. Select Apply.
  4. In the portal, go to Employee Tools > Grid Timecard Settings (for Standard Timecard, go to Employee Tools > Timecard Settings). Select the appropriate Company and PR Group.
  5. On the Cost Code line, select Advanced, then select Auto Select 1st.
    Make sure the appropriate dependencies are entered in Advanced Settings under Dependent Fields:
    • For EMCo, WO, and WOItem, add Equipment as a dependency.
    • For Equipment and WOItem, add CostCode as a dependency.
    Note: For Auto Select fields, do not use a large dataset. (Large dataset is an option in the Visibility field on the Grid Timecard Settings page.)
  6. Go to Admin > Portal Settings and select Refresh Synonyms.
    Note: Equipment will initially select based on EMCo but will update and correct itself based on your selections.