Successful Back-End But No Data in KUIB - Forum - Kendo UI Builder - Progress Community

Successful Back-End But No Data in KUIB

 Forum

Successful Back-End But No Data in KUIB

This question is answered

Hi,

We are able to create the backend successfully for tables in the sports database. When we create the KUIB web app, the data is retrieved and shows in the Kendo grid, as expected.

For tables in one of our databases, we are able to create the backend successfully. We can confirm this by displaying the catalog and the data from the table in a web browser. E.g. localhost:8810/.../ProductBE will display data from our product table.

However, in the KUIB, when we follow the same steps* as for a table in the sports database, nothing shows in the Kendo grid. It's as if there is no data in the table or access is blocked. Also, nothing happens in the Kendo grid when we click New to add a record.

*Steps in the KUIB: 1. Add the data provider for our table (we've been selecting a Progress Data Provider). 2. Create a module for our table, select the data provider, the data source, etc. 3. Save, generate and preview the app. No data displays; the grid has column heads as expected, but the data portion is empty.

We tried adding a write-json on the dataset in the ReadProductBE() (see below) to see what was being sent back, but the file is not even being created. I wonder whether this method is even getting called.

METHOD PUBLIC VOID ReadProductBE(
INPUT filter AS CHARACTER,
OUTPUT DATASET dsplu):

SUPER:ReadData(filter).

dataset dsplu:write-json ( “file”, “C:\Users\ftidev\Desktop\testProduct.json”, true ).

END METHOD.

We believe we are following the same steps at the backend and in the KUIB, but for different tables in different databases. The oepas1 server is connected to both databases. Are we limited to one database per oepas server instance?

Lastly, the database we are using for this project is an 11.6 database. The PDSOE and PASOE are 11.7.1. The KUIB is 2.0. Not sure whether these could be a factor in our case.

Any thoughts on where we should look next?

Thank you.

Regards,

Carl

Verified Answer
All Replies
  • Hi Carl,
     
    As a quick check, can you please verify if your database tables or fields has any hyphens (-) in them.
     
    There is an outstanding issue with hyphens in the schema in which case we have to use SERIALIZE-NAME (in temp-table definition) as a workaround to resolve the problem.
     
    Thanks and Regards,
    Anil Kumar.
     
  • Hi Anil,

    The database tables that we used do not have hypens in the table names, but I'm almost positive there are fields that have hypens in their names. If there are any such fields in the tables we are using, should we go into the TT definition include file (that is included in the business entity class) and add a SERIALIZE-NAME clause (with a name without hypens) for each such field?

    E.g. ... FIELD sell-price AS DECIMAL ... SERIALIZE-NAME "sellPrice" ...

    Thanks and Regards,

    Carl

  • Hi Carl,
     
    Yes. Please add SERIALIZE-NAME attribute (with a new non hyphened name) for respective fields in the temp-table definition and regenerate the JSDO catalog. Once the new JSDO catalog is created in PDS OE, please use this new catalog for creating Data Provider’s in KUIB environment.
     
    Please refer following KB article:
     
    Thanks and Regards,
    Anil Kumar.
     
  • Hi Anil,

    Once again, thank you for your help. The SERIALIZE-NAME modifications made the data flow to the KUI. We also had to serialize field names that contained "#" characters.

    In retrospect, the need to do this makes sense given that such characters are not valid in JS/JSDO. Addressing this will be one of our steps in our modernization project.

    Thanks and Regards,

    Carl

  • Hello Carl,

    If you are planning to do paging, filtering and sorting on the server side with JFP when using SERIALIZE-NAME, then you may want to specify the origName property so that the JFP support can identify the original field name.

    Example:

    @openapi.openedge.entity.field.property (field="Cust-Num", name="origName", value="Cust-Num").

    DEFINE TEMP-TABLE ttCustomer BEFORE-TABLE bttCustomer    

       FIELD Cust-Num AS INTEGER INITIAL "0"   SERIALIZE-NAME "CustNum"

       ...

    This is available via a field.property annotation that is written into the catalog.

    In a future version of OpenEdge, PDSOE would generate this annotation automatically.

    I hope this helps,

    Edsel