View from MSSQL procedure

I create empty screen with PopupView component (it can be changed). After press button in my main window i wish open Popup view with data from MSSQL database generated from procedure. I have method to create object with data from procedure (Object[][]).

So what is the problem? Could you explain in more detail?

I dont know how to change Object[][] to Entity or popupView in init method. I think i need the method
Table convertObject (Object[][] obj) but i dont have any idea how to convert it. Secondary problem is the layout. I cant implement an empty table component (datasource need to be filled).

You can use non-persistent entities to visualize arbitrary data.

  • Create an entity and select “Not persistent” in “Entity type”. Add attributes corresponding to your data.

  • In your screen, add a collection datasource. Select “Do not refresh” and deselect “Allow commit” checkboxes.

  • In the middleware service, create a list of your entities from Object[][] data and return it to the client.

  • In the screen, add entities to the datasource using includeItem() method.

  • Connect the datasource to visual components as usual.

See also an example here.

1 Like

Thanks very much! I will try it.