Y (TQL): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 23: Line 23:


{{article end
{{article end
|notes=
*The result of an Y-queries are array of values without the brackets when the Setting [[Setting#TQL_PANEL_BRACKETED|TQL_PANEL_BRACKETED]] is set to 'false'.
|seealso=
|seealso=
*[[X (TQL)]]
*[[X (TQL)]]

Revision as of 12:40, 3 November 2026

Instead of specifying a clause parameter with a particular Item ID, it is possible to use the 'Y' character for its value. Using 'Y' as a clause value automatically creates multiple TQL statements—one for each Item ID associated with that parameter in the project data. Internally, the resulting TQL statements and their results are stored as arrays of arrays.

Example

Consider the following (simplified) Neighborhood data of a project:

[ 
 { "id" : 0, "name" : "De Manege" },
 { "id" : 1, "name" : "De Lancaster" }, 
 { "id" : 2, "name" : "De Landstreken" }, 
 { "id" : 3, "name" : "De Kruidentuin" },
 { "id" : 4, "name" : "Golfresidentie" } 
]

The TQL statement

SELECT_NAME_WHERE_NEIGHBORHOOD_IS_Y

is internally replaced with a list of TQL statement arrays, separated by commas,

 [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_0 ], [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_1 ], [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_2 ], [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_3 ] , [ SELECT_NAME_WHERE_NEIGHBORHOOD_IS_4 ]

Its result will be an array of name arrays, separated by commas, for example:

["De Manege"], ["De Lancaster"], ["De Landstreken"], ["De Kruidentuin"], ["Golfresidentie"]

Clause Parameters

The Y value can be used in the following TQL Clause parameters:

Notes

  • The result of an Y-queries are array of values without the brackets when the Setting TQL_PANEL_BRACKETED is set to 'false'.

See also

API Endpoints