YA (TQL): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 7: Line 7:
==Clause Parameters==
==Clause Parameters==
The YA value can be used in the following TQL Clause parameters:
The YA value can be used in the following TQL Clause parameters:
<div style="column-count:3">
*[[Address (TQL Param)]]
*[[Area (TQL Param)]]
*[[Building (TQL Param)]]
*[[Category (TQL Param)]]
*[[Function (TQL Param)]]
*[[Global (TQL Param)]]
*[[Grid (TQL Param)]]
*[[Gridtype (TQL Param)]]
*[[Index (TQL Param)]]
*[[Indicator (TQL Param)]]
*[[Layertype (TQL Param)]]
*[[Levee (TQL Param)]]
*[[Map (TQL Param)]]
*[[Measure (TQL Param)]]
*[[Neighborhood (TQL Param)]]
*[[Net line (TQL Param)]]
*[[Net type (TQL Param)]]
*[[Net function (TQL Param)]]
*[[Net load (TQL Param)]]
*[[Net cluster (TQL Param)]]
*[[Overlay (TQL Param)]]
*[[Panel (TQL Param)]]
*[[Stakeholder (TQL Param)]]
*[[Terrain (TQL Param)]]
*[[Timeframe (TQL Param)]]
*[[Zone (TQL Param)]]
</div>


==Example==
==Example==
Line 35: Line 63:
|notes=*The following variants on YA exist:
|notes=*The following variants on YA exist:
**YCA: A combination between [[YC (TQL)|YC]] and [[YA (TQL)|YA]].
**YCA: A combination between [[YC (TQL)|YC]] and [[YA (TQL)|YA]].
*The result of an YA-queries are array of value-arrays without the outer brackets when the Setting [[Setting#TQL_PANEL_BRACKETED|TQL_PANEL_BRACKETED]] is set to 'false'.
|seealso=
|seealso=
*[[XA (TQL)]]
*[[XA (TQL)]]
Line 41: Line 68:
*[[YK (TQL)]]
*[[YK (TQL)]]
*[[YC (TQL)]]
*[[YC (TQL)]]
|api=*[[Api session event editor building query]]
*[[Tag#TQL Tags with X and Y Queries|TQL Tags with X and Y Queries]]
|api=*[[Api session query]]
}}
}}


{{TQL param nav}}
{{TQL param nav}}

Latest revision as of 08:34, 12 November 2026

The 'YA' clause value is a variation on the 'Y' clause value. The characters 'YA' should be followed by an underscore and the name of an Attribute; for example YA_MONUMENTAL.

The result of using 'YA' for the clause value is the automatic creation of multiple TQL statements, one with each Item ID for that Clause Parameter that can be found in the project data. Items are only taken into account if they have a non-zero value for the specified attribute.

Internally, both the resulting TQL statements and their results are stored as arrays of arrays.

Clause Parameters

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

Example

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

[ 
 { "id" : 0, "name" : "Lindelaan 3", "attributes": { "MONUMENTAL" : [0.0], "MEASURED_M2" : [200.0] } },
 { "id" : 1, "name" : "Kerklaan 40", "attributes": { "MONUMENTAL" : [1.0] } }, 
 { "id" : 2, "name" : "Achterweg 7", "attributes": { "MONUMENTAL" : [-3.5] } }, 
 { "id" : 3, "name" : "Achterweg 9", "attributes": { } },
 { "id" : 4, "name" : "Kerklaan 61", "attributes": { "MONUMENTAL" : [2.0]} },
 { "id" : 5, "name" : "Duiker 1235", "attributes": { "CULVERT_DIAMETER" : [1.0]} }
]

The TQL statement to obtain the names of the monumental Buildings is:

SELECT_NAME_WHERE_BUILDING_IS_YA_MONUMENTAL

which internally is replaced with a list of TQL statement arrays, separated by a comma:

[ [SELECT_NAME_WHERE_BUILDING_IS_1], [SELECT_NAME_WHERE_BUILDING_IS_2], [SELECT_NAME_WHERE_BUILDING_IS_4] ]

Its result will be a list of arrays with names, separated by a comma:

[ ["Kerklaan 40"], ["Achterweg 7"], ["Kerklaan 61"] ]

Similarly, the TQL statement to obtain the MONUMENTAL attribute values of monumental Buildings is:

SELECT_ATTRIBUTE_WHERE_BUILDING_IS_YA_MONUMENTAL_AND_NAME_IS_MONUMENTAL

Its result will be a list of arrays of values, separated by a comma:

[ [1.0], [-3.5], [2.0] ]

Notes

  • The following variants on YA exist:
    • YCA: A combination between YC and YA.

See also

API Endpoints