PR Craft Template Overrides Lookup for Timecard Entry

Keystyle Support Team -

If you use Craft Templates that have overrides applied to them, follow the steps below to configure your craft lookup to respect this logic.  This logic will only be applied if craft is a column shown on the timecard.  This article will guide you through the process of creating a user defined lookup in Vista, applying the lookup to Vista's PR Timecard Entry, and configuration the Keystyle Portal to inherit the lookup.

Lookup

  • From
    • PRCM with (nolock)
  • Join
    • LEFT OUTER JOIN JCCO on PRCM.PRCo = JCCO.PRCo
      LEFT OUTER JOIN JCJM on JCCO.JCCo = JCJM.JCCo
      LEFT OUTER JOIN PRCT on PRCM.PRCo = PRCT.PRCo and PRCM.Craft = PRCT.Craft and PRCT.RecipOpt = 'O' and JCJM.CraftTemplate = PRCT.Template
      LEFT OUTER JOIN PRCM JCraft on PRCT.PRCo = JCraft.PRCo and PRCT.JobCraft = JCraft.Craft
      OUTER APPLY PREH
  • Where
    • PRCM.PRCo = ? and PREH.PRCo = PRCM.PRCo
      and PREH.Employee = ?
      and 1 = CASE WHEN ? is null Then 1
      WHEN JCJM.Job is null Then 1
      When ? is not null and JCJM.Job = ? and PRCM.Craft is not null then 1
      Else 0 END
  • Details
    • ISNULL(PRCT.JobCraft, PRCM.Craft)
    • CASE WHEN PRCT.JobCraft is not null then JCraft.[Description] Else PRCM.[Description] END
    • ROW_NUMBER() OVER (ORDER BY CAST(CASE WHEN PREH.Craft = PRCM.Craft Then 1 Else 0 END as varchar(1)) desc, RIGHT('          ' + ISNULL(PRCT.JobCraft, PRCM.Craft),10) asc)
  • Group By
    • ISNULL(PRCT.JobCraft, PRCM.Craft), CASE WHEN PRCT.JobCraft is not null then JCraft.[Description] Else PRCM.[Description] END
      , RIGHT(' ' + ISNULL(PRCT.JobCraft, PRCM.Craft),10), CASE WHEN PREH.Craft = PRCM.Craft Then 1 Else 0 END

 

Applying the Lookup in Timecard Entry

  1. Open PR Timecard Entry
  2. Select the Craft Field and press F3
  3. Select the Lookups tab
  4. Enter in the name of the Lookup made in the above step
  5. Enter in the parameters -1,10,20,20,20
  6. Set the Load Sequence to 0
  7. Change any other load sequences on the form to a number greater than 0
  8. Click OK

 

 

Portal Setup

  1. Navigate to Admin > Timecard Settings
  2. On the Craft Column select Blank for New Line Behavior and check the Auto Select 1st

Run the Attached SQL script to update TimecardColumnStatic

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk