Tree dataset checklist

  • Last update:  2021-12-31
  • I. Description

    The tree data set is mainly used to build the relationship between departments. Each department needs to provide an original tag field and a parent tag field. The backend builds a tree structure based on these two fields during synchronization.

    However, customers sometimes fail to synchronize the tree data set when updating the designer version, mainly because the tree data set is configured incorrectly or is not a complete tree structure itself.

    Here are a few more complete tree structures to tell you what you need to pay attention to when building a tree data set.

    II. Tree structure and precautions

    1. Tree structure (Type 1)

    1) Data Sheet

    1.png

    2) Tree dataset

    2.png

    The above is a complete tree data set, with Department ID as the original tag field, and Superior IDas the parent tag field.

    E.g:

    The second line means that the original mark of Human Resources Department is 11, and its parent department is the department marked 1 (then you can check that its parent department is the headquarters based on this mark).

    The first line indicates that the flag of the headquarters is 1, and the parent flag is empty, which means that it is the root department and has no parent department. Usually, if a department does not have a parent department, then the parent department flag is empty.

    After traversing this data set, all department information and position information can be obtained; according to the Superior ID, go to the Department IDcolumn to find the corresponding department name, so that the parent department can be constructed.

    3) Matters needing attention

    It should be noted that: for the marks (except empty) that appear in the Superior ID, the corresponding mark must be found in the Department ID. You can see that all the superior IDsin the above figure can be found in the Department IDTo find the corresponding value.

    If the situation shown in the figure below occurs, the Superior ID is 2, but no department information of 2 is found in the Department ID, so there is no way to construct department information with the Superior ID of 2, so that the tree is considered incomplete Yes, the synchronization action of the synchronized data set is returned directly, and the synchronization operation is not performed.

    3.png

    Then the following errors will be reported in the log:

    4.png

    It means that the department corresponding to mark 2 cannot be found!


    2. Tree structure (Type 2)

    1) Data Sheet

    5.png

    2) Tree dataset

    6.png

    The tree is constructed with Department_name and Superior_name. This so-called tag field is only used to mark the direct hierarchical relationship of the department and will not participate in business processing.

    This also requires that the marked field in the Superior_name should be able to find the corresponding department in the Department_name. If it can't be found, it will exit directly and refuse to synchronize.

    3) Matters needing attention

    The precautions are the same as above. The tags (except empty) that appear in the Superior_namemust be found in the Department_name, otherwise the tree is considered to be incomplete, and the synchronization action of the synchronized data set is returned directly without synchronization.


    3. Tree structure (Type 3)

    1) Data Sheet

    7.png

    2) Tree dataset

    8.png

    The same is to use the Department ID and Superior ID to mark. It is also necessary to ensure that the Superior ID column can be found in the Department ID, otherwise the synchronization will be rejected.

    The tree is constructed based onDepartment ID and Superior ID.

    3) Matters needing attention

    The necessary and sufficient conditions to ensure that the tree dataset is correct:

    a. The value that appears in the parent tag field (except for empty), the corresponding value can be found in the original tag field.

    b. For rows with the same original tag field, the two columns of department name and parent tag must also be the same, as shown in the last two rows in the data table above.

    c. For rows with the same parent tag and department name, the original tag columns must be the same, as shown in the last two rows in the data table above.

    If there are these situations in the following figure, an error will be reported:

    • The error message is as follows:

    9.png

    A certain department has two parent departments, which is obviously not a tree structure.

    Once the tags of a department are the same, it means that the department is determined, and thesuperior IDand department ID of this department must be the same.

    As shown in the figure below, the departments of lyon and loy are both marked as d, but their parent departments are different. Obviously the data is wrong. Just correct them.

    10.png

    • The error message is as follows:

    11.png

    It is also wrong for the department name corresponding to a tag to be different, and the synchronization will also be rejected.

    12.png

    • The error message is as follows:

    13.png

    This means that when the parent department is determined, the department name is unique, so the department label is also unique; the above figure shows that the department label is not unique.

    The department names can be the same. For example, the sales department has a sub-department called the performance group, and the R&D department can also have a sub-department called the performance group.

    But when the parent department is determined, the department name cannot be repeated.

    For example, the departments of lyon and loy are both performance groups, and the parent department labels are both d, it means that two people are in the same department, then the department labels should be the same, the two employees in the above figure have different department labels, then It will also report an error and refuse to synchronize. That is, when the parent department is determined, a department can be uniquely determined based on the department name.

    14.png

    • In the actual situation, there is another situation where the upper and lower levels are each other. This structure or data sometimes appears in some companies that implement flat management, that is, department A is the superior of department B, and department B is department A. At the upper level, such two departments will fail when the organization is synchronized, but it is rare.

    III. Supplementary explanation

    Fields similar to 0 and 0000000 cannot appear in the original field and the parent tag field, because these tags will be parsed into 0, and 0 is a reserved field in the program, which is the ID of all departments, so try to avoid it.

    When constructing the tree structure, if a department does not have a parent department, then the parent department is empty, so don't just write it.

    In addition, you must back up the JAR package file before upgrading the designer.

    Attachment List


    Theme: Report Application
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy