chavez
16th February 2016, 12:52
Hello,
Is it possible to use na index from a secondary table (sec.add.table) in a maintain session?
Thanks
Chavez
Ajesh
16th February 2016, 13:41
Didnt understand the question. Did you mean you want to show the records on Maintain Session, Is it Multi Occurence?, from a secondary table instead of Main Table?
chavez
16th February 2016, 14:18
Hello Ajesh,
I want to allow the users to sort the records in the session using an index from another table.
I already linked the table with the sec.add.table function but don't know how to add the index in the session.
Thanks
bhushanchanda
16th February 2016, 14:27
Hi,
From the Programmers Guide -
The following standard program features are handled differently for secondary tables.
The 4GL-Engine will not generate the queries for retrieving and updating the secondary table records. The UI script of the application is responsible for passing the correct queries to the 4GL-Engine through the query.extend functions.
Maintain references and related reference buffers. The UI script of the application is responsible for filling reference fields referred to by secondary table fields (for instance descriptions).
Secondary tables without DAL2 scripts are not supported.
Auto complete in BW mode will not be available for secondary table fields.
Secondary table fields cannot be shown above the grid as view fields.
The sort order is always based upon the available main table indices and not on secondary table indices.
Running MT sessions through application functionserver (AFS) is not supported.
When a main table record is deleted related secondary table records are not automatically deleted by the 4GL-Engine. The DAL of the main table is responsible for cleanup of related secondary table records.
chavez
16th February 2016, 14:50
Thank you Bhushan,
I'll try another way.
darkhorse
16th February 2016, 18:32
Hi,
Best practice could be using query.extend in which refer main table with secondary table. and fetch the main table records as per your requirements
Hope this helps
chavez
16th February 2016, 23:45
That could be a solution but doesn't allow index change.
I wonder why is sec.add.table needed.