Linking of one table to multiple datacontrols

SAMPLE_DM.pas (14.8 KB)
Hi,
I am writing a unigui application using Delphi and TMS business tools. In the application, i have one master table as TRANH_TEST and detail table linked to it is INVENTORYF. I am creating a transaction entry. In TRANH_TEST, single record will be inserted for each trnsaction. In InventoryF table, there will be multiple records linked to TRANH_TEST record. In InventoryF, there will be records for received_quantity as well as issue_quantity. I want to show those records in 2 separate UniDBGrids . One grid will show data having RECEIVED_QUANTITY>0 and second grid will show records having ISSUE_QUANTITY>0. Basically, received quantity records and issue quantity records will be added/updated in two different grid controls. But ultimately both grid records will be linked to one single TRANHID in TRANH_TEST table. At the end, once data adding/updating is completed in application and user cicks on 'SAVE entry' button, it should get updated to database using single update command to tranh_test table.
For exa.
XDataClient.Put(FrecTranH) OR
XDataClient.Post(FrecTranH);
But, i am not able to control INVENTORYFLIST data through multiple grid controls/aureliusdataset.
Can u give me one sample code for above programme.

Find attached datamodel created for this sample project.

Thanks ,
Rohini

You should create a XData service operation for that, instead of relying on CRUD endpoints.

Your model is not fit to pure CRUD operations, since you have a specific GUI in mind and your database data is kind of "different" from the UI.

So, build your GUI the way you want, then create a service operation in XData that receives the data and inside the service operation do your specific tasks to properly convert the data received from the GUI to the Aurelius entities in the "database format".