I’m trying to dial in the logic that Epicor uses to determine which items are listed on the “Active Work”, “Current Work”, “Available Work” and “Expected Work” tabs on the MES Work Queue. My goal is to construct a SQL Query to recreate this status.
I ran a trace and I can see what I’m looking for is calculated and returned as the RegionCode and RegionDescription as part of the WorkQueueDataset. Is there any way to see the actual SQL Epicor used to calculate this field so that I can recreate the SQL myself for a report that I’m working on?
If you’re trying to recreate this, why not just call the BO to do the work for you? It may use code to group the records.
If you are doing it with just a query, then you may need nested case statements or union of 4 selects. The help is pretty clear about the criteria for each ‘regioncode’:
Active operations are defined as operations that have already been started for the current user; these are jobs that have been selected in the Current, Available and Expected sheets, and for which activity has been started (user has clocked in on these operations).
Current operations are defined as operations that are scheduled for the selected resource group that are not yet started, but where previous operations for the job are complete.
Available operations are defined as operations scheduled for the selected resource group where a completed quantity exists from a previous job operation, making it possible to start work on the operation.
Expected operations are defined as operations scheduled for the selected resource group, but quantities have not yet been completed on previous operations.
Apologies if this doesn’t fit your reqs, but the trace below details the BO call, could you use the REST API to call this object and return the data as JSON?
Thanks Andrew, that most definitely helps. I was hoping to try in Sql, so that the dataset could be used for other dashboards, but this will be just as useful as well.
I am looking to do exactly this, use REST to get the work queue data using C# and the EpicorRest API but I am struggling with how to send the required information to the server to get the correct response. I wonder if @josecgomez would be willing to help with the proper way to do this?
When I send the following information using swagger, I get exactly what I am looking for. The question is how do I do it with the API?
Here is what is required for the BO:
{
“pcResourceGrpID”: “MSMILL02”,
“pcEmpID”: “10389”,
“pcwhereClauseWorkQueue”: “”,
“pcwhereClausePartWip”: “”,
“pageSize”: 0,
“absolutePage”: 0,
“LaborType”: “”,
“clearCache”: true,
“filterParameters”: “”
}