TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

The "Find View Sort Duplicates" operation in the "View Sorts" resource is designed to identify duplicate view sort configurations based on provided criteria. This node is useful when you want to ensure that no redundant or repeated sorting rules exist within your views, which can help maintain data consistency and optimize query performance.

Typical use cases include:

  • Validating view sort definitions before saving or applying them.
  • Cleaning up existing view sorts by detecting duplicates.
  • Automating quality checks in workflows that manage view configurations.

For example, if you have a list of sorting rules applied to a data view and want to find any duplicates among them, this node can process the input data and return the duplicates found.

Properties

Name Meaning
Depth Determines how deeply nested related objects are included in the response:
- 0: Only the primary object's information.
- 1: Primary object plus directly related objects (no further nesting).
- 2: Primary object, its related objects, and their related objects.
Data JSON array specifying the sorting criteria to check for duplicates. Each item typically includes identifiers like fieldMetadataId to define the sort fields.
Ids JSON array of IDs to limit the search scope for duplicates. Can be used to specify particular view sort IDs to check against.

Output

The node outputs JSON data representing the duplicates found based on the input criteria. The structure will reflect the view sort objects and their related entities according to the specified depth level. The output does not include binary data.

Dependencies

  • Requires an API key credential for authenticating requests to the external service providing the view sort data.
  • The node uses a base URL configured via credentials to connect to the relevant API endpoint.
  • No additional environment variables are explicitly required beyond standard API authentication setup.

Troubleshooting

  • Invalid JSON in Data or Ids properties: Since these inputs expect JSON arrays, malformed JSON will cause errors. Ensure proper JSON formatting.
  • Authentication errors: If the API key or domain credentials are missing or incorrect, the node will fail to connect. Verify credential configuration.
  • No duplicates found: If the output is empty, it means no duplicates matched the criteria. Confirm that the input data correctly represents the view sorts to check.
  • Depth parameter misuse: Setting an unsupported depth value may result in incomplete or unexpected data. Use only 0, 1, or 2 as defined.

Links and References

  • JSON Array Format
  • General API Authentication Concepts (refer to your API provider's documentation)

Discussion