Data Table Dependency Description
Dependency Table Implementation Logic
Reference the data structure and data of the source table into another application, allowing the data of this table to be used in the other application.
Dependency only references the data structure and data into another application; it does not reference the functional logic within the table
Typical Usage Scenarios
In a company team, there are two applications: OA and ERP. The OA application has an employee table that records employee information. Now, the responsible person field in the ERP order has a type of "Related Record", and the related table wants to select the employee table from OA. For such scenarios, we can create an employee dependency table in ERP, which is the dependency table for the OA employee table in ERP. Then, in the responsible person field of the ERP order, we can select the employee dependency table as the related table, thereby enabling the reference of the OA data table in ERP.
Steps to Set Up a Dependency Table
Continuing with the above scenario, to set up a dependency table, we first need to establish application dependencies in the global settings of the applications. In OA, we need to set to allow ERP to depend on this application; in ERP, we need to set the dependency on OA.
OA Application >> Global Settings >> Advanced Settings >> Allow the following applications to depend on this application
ERP Application >> Global Settings >> Advanced Settings >> Dependent Applications
Then, create an employee module in ERP, select Data table from another application as the data source type, select OA as the application, and enter the identifier of the employee table in OA as the data table identifier.
Behaviors of Dependency Tables
Basic Information
Basic information such as module name and identifier can be set independently in the dependency table.
Form Fields
Form fields in the dependency table will use the settings from the source table and cannot be set independently.
Permission Settings
Permission settings in the dependency table will use the settings from the source table and cannot be set independently.
Table Display
Table display content of the dependency table can be set independently.
Form Display
Form display content of the dependency table can be set independently.
Data Filtering and Sorting
Data filtering and sorting of the dependency table can be set independently.
Functional Controls
Dependency tables only reference data structures and data into another application, and functional logic cannot be carried over. Therefore, all controls within the table need to be reconfigured.
Controls in forms can be configured in the form settings.
Controls in the toolbar can be configured in the toolbar settings.
Workflow
Workflows are bound to applications, so workflows cannot be brought to the dependency table through dependency associations.
Recommendations for Multi-Application Collaboration
For scenarios like the above where applications need to share data tables without executing specific business logic in the tables, we recommend implementing it using the dependency method. However, if one application needs to deeply call the functional logic of another table, we recommend implementing it by embedding an external system.
For example, in the above OA and ERP scenario, if the business requires the ability to modify employee work status directly in the employee table within ERP, we can create an external system module in ERP and set the access URL of the OA employee table in this module. To ensure that this module works normally in different environments, the URL address needs to be written as a relative path, and the domain name can be obtained by concatenating the current domain name. Below is a standard way to write an expression for embedding a URL:
/app/${Misc.getAppIdByKey('yinyanAPP')}/table/sfacyuvybj0i5?nonav=true
