1. Knowledge Base
  2. AI Financial Intelligence

A cycle has been detected in the report layout [..] - Parent–Child Relationship Validation Error

Issue Description

The error you are seeing appears due to the introduction of a parent–child relationship validation mechanism in the system.
This validation is an important safeguard — a single row cannot reference itself. Such a scenario would cause a logical loop or inconsistency in the data hierarchy.

The information displayed in the error message was prepared by the development team.
This situation may occasionally occur, especially when AI did not correctly build the parent–child structure in the report.


Example of a Valid Structure

To illustrate how the relationship should look:

Line Parent
1.1.1 1.1
1.1.2 1.1
1.1.3 1.1

In this case, lines 1.1.1–1.1.3 correctly share the same parent 1.1 — this is valid.

The issue occurs when a row references itself, for example:

Line Parent
1.1.3 1.1.3

 

When such a case is detected, the system raises a Parent–Child validation error.


How to Fix the Error

Option 1 – Manual Correction

  1. Locate the record indicated in the error message.

  2. Review the account description or report structure to determine the correct parent.

  3. Click in the Parent column for the problematic row and select the appropriate parent entry.

  4. Save your changes.

Note: The last row in the hierarchy usually represents a summary line and should not reference any parent.
If this row references itself, simply clear the Parent field — this will resolve the issue.


Option 2 – Automatic Fix Using AI

If you are unsure how to manually correct the hierarchy, you can use the Update Template → Update with AI option:

  1. Select Update with AI.

  2. In the prompt window, describe the issue, for example:
    “Please fix the parent-child structure to ensure that no item references itself.”

  3. The AI will attempt to rebuild the hierarchy automatically.

Important: The AI-generated fix may not always be perfect, but it’s usually the fastest and easiest option for users unfamiliar with the data structure


Validation After Saving

When you save the changes (manually or via AI), the system automatically re-validates the entire parent–child hierarchy.
If the structure is correct, the error will no longer appear.


Summary

  • The error occurs when a line references itself in the parent–child hierarchy.

  • This validation ensures data integrity and prevents circular relationships.

  • You can fix it:

    • manually — by updating the Parent field,

    • or automatically — via Update Template → Update with AI.

  • The system will validate the structure again upon saving.