Read service gets data but the jsdo is empty - Forum - Mobile - Progress Community

Read service gets data but the jsdo is empty

 Forum

Read service gets data but the jsdo is empty

This question is not answered

NOTE: This is for OpenEdge Mobile AppDesigner, NOT the Telerik platform.

Has anyone seen this? I have a service that I call to get all employees to populate a select component. I get the data and my select is populated with the options using the emp_id as the value and I use the first and last name to display.

I have a need in the value change of the select, to update the first and last name of the row record to the new emp_id selected. When I try to query the employee jsdo, it does not have any records.

I'm using another one on this screen the same exact way and that one has data, so I'm assuming that there is something wrong with my service in some way.

I have no idea what data you would need to see to even start troubleshooting this!

I did recreate the business entity and updated the defined service. I then removed the employee service from app designer and then added it back and and hooked everything back up.

So, the read service is successful and in the success event of the read service, I can see that the data parameter given has all of the data and my select control gets populated properly, but the employee jsdo has no records in it.

I call the PicasMobileService_beoEmployee_JSDO.jsdo.hasData() and it is false, but I have beoActivity that has the select control filled with all of the activities to choose from that I build the same way and this has data.

All Replies
  • Hello,

    Do you see any messages in the JavaScript Console?

    What does the data parameter for the success event looks like?

    Are you using a multi-table DataSet?

    You could do some debugging and set breakpoints for the JSDOReadImpl object.

    The "this.process" code in JSDOReadImpl has logic to perform a svc_jsdo.fill() and process the response using the afterFill event.

    There you can call svc_jsdo.hasData() or svc_jsdo.getData() to see the data for resource.

    If you have a multi-table DataSet, then you need to specify the table reference.

    For example:

       svc_jsdo.eCustomer.getData()

    For debugging purposes, you access the internal property "_data":

       svc_jsdo.eCustomer._data

    getData() and _data would generally have the same value, however, if you are working with a child table of a multi-table DataSet, then getData() would only return the records for the relationship. (You can turn off this behavior using the useRelationships property.)

    I hope this helps.

  • I found out that this has to do with using SERIALIZE-NAME on the temp table definition. The dataset and the temp table have it.

     DEFINE TEMP-TABLE ttEmployee  NO-UNDO SERIALIZE-NAME 'EmployeeFields' BEFORE-TABLE before-ttEmployee

    DEFINE DATASET dsEmployee SERIALIZE-NAME 'EmployeeDataset' FOR ttEmployee.

    I create the business entity using the dsEmployee.i and generate the json file and this is what I get:

    {
    "name": "beoEmployee",
    "path": "\/beoEmployee",
    "autoSave": true,
    "schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {"EmployeeDataset": {
    "type": "object",
    "additionalProperties": false,
    "properties": {"ttEmployee": {
    "type": "array",
    "items": {

    So, it seems to use the serialize name on the dataset, but not the temp table.

  • Hello,

    Yes, it looks like the catalog generation from PDSOE uses the serialize name on the dataset but not on the temp table.

    The JSDO uses the information in the catalog to recognize the JSON payload sent from the server.

    A possible workaround to keep SERIALIZE-NAME and be able to recognize the JSON payload, would be to manually edit the catalog file to use the expected names (or use a copy of it), however, if you re-generate the catalog then those changes would be overwritten.

    Could you contact Technical Support to open a bug report?

    Thank you and regards.