REST BAQ Labels versus alias

I have designed a BAQ to be called via REST. I deliberately used labels so that my data-bound grid could easily find the values to display (rather than have to parse and change the JSON before binding it to the control).

What I am finding is that the REST interface ignores the labels and instead sends the JSON with the aliases for the columns (giving me no way to have alternative column names).

An example will make this clear:

This is what I am getting:

{
  "odata.metadata": "https://pwsepicorapp.draper.com/ERP10.2/api/v1/BaqSvc/YSG-Job/$metadata#Epicor.DynamicQuery.QueryResults",
  "value": [
    {
      "LaborDtl_JobNum": "000001",
      "LaborDtl_OpCode": "_CMPTRVL",
      "LaborDtl_ClockInDate": "2016-03-17T00:00:00",
      "JobHead_PartDescription": "PRINTED WIRING ASSEMBLY, COMMON PROCESSOR, EA5, EA8, EA11, EA15",
      "JobHead_JobCompletionDate": "2017-02-07T00:00:00",
      "RowIdent": "4581d644-03cb-4516-a963-e222ec812398"
    },
    {
      "LaborDtl_JobNum": "000003",
      "LaborDtl_OpCode": "_CMPTRVL",
      "LaborDtl_ClockInDate": "2016-03-29T00:00:00",
      "JobHead_PartDescription": "PRINTED WIRING ASSEMBLY, STELLAR ELECTRONICS, SME3",
      "JobHead_JobCompletionDate": "2017-02-15T00:00:00",
      "RowIdent": "c3863441-7e3b-49af-b0b2-b30a8ac322b3"
    },

But instead of something like “LaborDtl_JobNum” I wanted just JobNum

As I show in the BAQ designer:

Correct, the REST interface does not yet support Labels
This as I understand it is in the TODO already and will be handled at a later release.

As addressed here: Any way to return the "BAQ Field Label" instead of the "BAQ Field Alias" through the REST API?

1 Like

In the meantime you can call the baq def BOs to get that info and match it up

The issue is the remapping has to happen on the client in javascript. But I understand that v2 is a WIP and we can be patient.

Should the BO you mentioned here be available via the API? I couldn’t find it

DynamicQuery is the BO you’re looking for. You can get the label info from the actual def of the BAQ

1 Like