TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows you to create a new View Filter within a specified View Filter Group in the TwentyDEV system. A View Filter is typically used to define criteria or conditions that filter data displayed in a particular view, enabling users to customize and narrow down the information they see.

Common scenarios for this node include:

  • Automating the creation of filters to segment data dynamically based on user input or other workflow data.
  • Managing complex views by programmatically adding filters without manual intervention.
  • Integrating with other systems where filter definitions need to be synchronized or generated automatically.

For example, you might use this node to add a filter that only shows records where a certain field matches a specific value, or to position a new filter at a particular place within an existing group of filters.

Properties

Name Meaning
Depth Determines the level of nested related objects to include in the response. Options: 0 (only primary object), 1 (primary object + directly related objects), 2 (primary + directly related + their related objects).
View Filter Group Id Identifier of the View Filter Group where the new filter will be created.
View Id Identifier of the View to which the filter belongs.
Sub Field Name Name of a sub-field related to the filter target field.
Position In View Filter Group Numeric position indicating where in the filter group this filter should be placed.
Display Value The display text or label for the filter as it appears in the UI.
Value The actual value used by the filter to match against the target field.
Operand The operand or operator used in the filter condition (e.g., equals, contains).
Field Metadata Id (Required) Identifier of the target field metadata that this filter applies to.

Output

The node outputs JSON data representing the newly created View Filter object. This output includes all relevant details of the created filter such as its identifiers, values, positions, and any nested related objects depending on the Depth parameter.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential to authenticate requests to the TwentyDEV API.
  • The node uses the base URL configured in the credentials for making HTTP requests.
  • No additional external dependencies are required beyond the provided API access.

Troubleshooting

  • Missing Required Fields: If the Field Metadata Id or other required properties are not provided, the API will likely return an error. Ensure all mandatory fields are set before execution.
  • Invalid Identifiers: Providing incorrect or non-existent View Filter Group Id or View Id may cause the API to reject the request. Verify these IDs exist and are correct.
  • Permission Issues: Insufficient permissions associated with the API key can lead to authorization errors. Confirm the API key has rights to create view filters.
  • Position Conflicts: Setting a Position In View Filter Group that conflicts with existing filters might cause unexpected behavior; verify the position is valid within the group.
  • Operand and Value Mismatch: Using operands incompatible with the field type or providing invalid values may result in errors. Check the API documentation for valid operand-value combinations.

Links and References

Discussion