Easy Indicator of Materials Available

Anyone have any creative methods of determining if all materials for a job are available to produce that job? It would be great to have a field in job head indicating if I were to run the job right now (no pegging or allocation taken into account) would I have the material to run it.

Let me check my stash, I’ve done this on a dashboard before.

Job tracker has a built-in tool for this under actions. I think it is called material status. I am not sitting in front of an Epicor screen at the moment.

Unless you want to see a dashboard view.

Brad

Brad

1 Like

Here is a way I have not tried yet… Epicor 10.2… By using only BPM widgets, no code…

Two pieces:

  1. Customization in Job Entry/Tracker: Add an EpiShape bound to one of the Checkboxes (JobHead.Checkoff1)
  2. Post Processing BPM on JobEntry.GetList (best one? or another method that is called when a Job selected in Job Entry/Tracker). This BPM would call the JobEntry.GetJMtlStat. You will need to create two dataset variables one for the filter values for input into the method and one to hold the results.
    In the Filter dataset you will set the date to today and enable Exceptions only and set the JobNum. Then use the ‘Update Table by Query’ widget and Query the dataset returned to the JobNum. Any matches would indicate an exception since only exceptions were returned. So then when you define the ‘specified’ mapping, you would set Checkoff1 to an ‘expression’ of ‘true.’ This will only get set for matching values from the query and records will only be returned if there is an exception.
    Then the EpiShape will go Green when Checkoff1 is true.
    This is a rough explanation, but I think it will work… lots of details I didn’t cover, but if I have time I will try to build this out and give a better explanation.

I’d be interested in this dashboard as well!

@mheineman
this is my BAQ, to check issued material, for any open non started Jobs, alter it to suit your use then add it to a dashboard if you want, you may need to replace my subquery to show total material on Hand instead of total issued, then add a calculated field on the top level query to check each material row i.e. if total mtl in stock is higher than job required material for each line then give true etc
Note: My Epicor version is 10.1.400.20

BEV-NonStartedJobsMtl.baq (30.9 KB)

1 Like

I am going to give that a shot @Rick_Bird you were closest to the mark of what I’m looking for. In a single dashboard row yes or no are the materials good to go.

1 Like

That was the ticket, works great had to handle exceptions in a goofy way but here it is for my purposes

foreach(var tt in ttResults.Where(x => x.JobOper_QueStartDate < DateTime.Today.AddDays(45)))
{
   using (var job = Ice.Assemblies.ServiceRenderer.GetService<JobEntrySvcContract>(Db))
   {
     List<string> exlist = new List<string>();
     
     // Create job filter
     JMtlStatFiltersTableset filter = job.GetJMtlStatFilters(tt.JobAsmbl_JobNum); 
     filter.JMtlStatFilters[0].CutoffDate = tt.JobHead_DueDate;
     filter.JMtlStatFilters[0].ExceptionsOnly = true;    
     filter.JMtlStatFilters[0].RowMod = "U";
     
     // If we were able to create the filter carry on
     if(filter != null)
     {     
       try
       {
         JMtlStatTableset stat = job.GetJMtlStat(filter);
         
         if(stat != null && stat.JMtlStat.Count > 0)
         {
            // Build exception list
            foreach(var mtlex in stat.JMtlStat)
            {
              exlist.Add($"{mtlex.PartNum} due {mtlex.DueDate}");
            }
            tt.Calculated_MtlStatus = $"Review: {string.Join(", ", exlist)}";
         }
       }
       catch(BLException ex)
       {
          if(ex.Message.StartsWith("No materials required for"))
          {
            tt.Calculated_MtlStatus = $"OK";
          }
          else
          {
            tt.Calculated_MtlStatus = $"!!: {ex.Message}";
          }
       }
     }
   }
}

Results in

1 Like

Can you share the BAQ please?