XC (TQL): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 2: Line 2:


This ''Search Polygon'' is determined by the linked content item. Since content item linkage is currently limited to Template Text and Excel Panels, XC should only be used there.
This ''Search Polygon'' is determined by the linked content item. Since content item linkage is currently limited to Template Text and Excel Panels, XC should only be used there.
==Clause Parameters==
The XC value can be used in the following TQL Clause parameters:
<div style="column-count:3">
*[[Address (TQL Param)]]
*[[Area (TQL Param)]]
*[[Building (TQL Param)]]
*[[Levee (TQL Param)]]
*[[Measure (TQL Param)]]
*[[Neighborhood (TQL Param)]]
*[[Net cluster (TQL Param)]]
*[[Net load (TQL Param)]]
*[[Net line (TQL Param)]]
*[[Panel (TQL Param)]]
*[[Terrain (TQL Param)]]
*[[Zone (TQL Param)]]
</div>


==Example==
==Example==
Line 36: Line 53:
The TQL statement
The TQL statement
<pre>SELECT_NAME_WHERE_AREA_IS_XC</pre>
<pre>SELECT_NAME_WHERE_AREA_IS_XC</pre>
for the Text Panel linked to Neighborhood "East Side" is internally replaced with a list of TQL statements, separated by comma's,
for the Text Panel linked to Neighborhood "East Side" is internally replaced with a list of TQL statements, separated by commas,
<pre>SELECT_NAME_WHERE_AREA_IS_1, SELECT_NAME_WHERE_AREA_IS_3</pre>
<pre>[ SELECT_NAME_WHERE_AREA_IS_1, SELECT_NAME_WHERE_AREA_IS_3 ]</pre>
Its result will be a list of names, separated by comma's, for example:
Its result will be a list of names, separated by commas; for example:
<pre>"Upper Right", "Lower Right"</pre>
<pre>[ "Upper Right", "Lower Right" ]</pre>
 
==Clause Parameters==
The XC value can be used in the following TQL Clause parameters:
<div style="column-count:3">
*[[Address (TQL Param)]]
*[[Area (TQL Param)]]
*[[Building (TQL Param)]]
*[[Neighborhood (TQL Param)]]
*[[Zone (TQL Param)]]
*[[Net load (TQL Param)]]
*[[Net line (TQL Param)]]
</div>


{{article end
{{article end
|notes=*The following variants on XC exist:
|notes=*The following variants on XC exist:
**XCA: A combination between [[XC (TQL)|XC]] and [[XA (TQL)|XA]].
**XCA: A combination between [[XC (TQL)|XC]] and [[XA (TQL)|XA]].
Line 63: Line 67:
*[[XA (TQL)]]
*[[XA (TQL)]]
*[[XK (TQL)]]
*[[XK (TQL)]]
|api=*[[Api session event editor building query]]
|api=*[[Api session query]]
}}
}}


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

Latest revision as of 12:09, 4 November 2026

Instead of specifying a clause parameter with a particular Item ID, it is possible to use the 'XC' characters for its value. Using 'XC' automatically creates a TQL statement for every Item ID in that clause parameter that overlaps the Search Polygon. Both the generated TQL statements and their results are handled internally as arrays.

This Search Polygon is determined by the linked content item. Since content item linkage is currently limited to Template Text and Excel Panels, XC should only be used there.

Clause Parameters

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

Example

Neighborhoods in an example project
Areas in an example project

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

[ {
  "id" : 0,  "name" : "East Side",
  "polygons" : { "type" : "MultiPolygon", "coordinates" : [ [ [ [ 250.0, -500.0 ], [ 500.0, -500.0 ], [ 500.0, 0.0 ], [ 250.0, 0.0 ], [ 250.0, -500.0 ] ] ] ]  }
}, {
  "id" : 1,  "name" : "West Side",
  "polygons" : {  "type" : "MultiPolygon", "coordinates" : [ [ [ [ 0.0, -500.0 ], [ 250.0, -500.0 ], [ 250.0, 0.0 ], [ 0.0, 0.0 ], [ 0.0, -500.0 ] ] ] ]  }
} ]

and the Area data:

[ {
  "id" : 0,  "name" : "Upper Left",  
  "polygons" : {    "type" : "MultiPolygon",    "coordinates" : [ [ [ [ 110.0, -110.0 ], [ 110.0, -100.0 ], [ 100.0, -100.0 ], [ 100.0, -110.0 ], [ 110.0, -110.0 ] ] ] ]  }
  }, {
  "id" : 1,  "name" : "Upper Right",  
  "polygons" : {    "type" : "MultiPolygon",    "coordinates" : [ [ [ [ 435.0, -95.0 ], [ 425.0, -95.0 ], [ 425.0, -105.0 ], [ 435.0, -105.0 ], [ 435.0, -95.0 ] ] ] ]  }
  }, {  
  "id" : 2,  "name" : "Lower Left",  
  "polygons" : {    "type" : "MultiPolygon",    "coordinates" : [ [ [ [ 165.0, -425.0 ], [ 165.0, -415.0 ], [ 155.0, -415.0 ], [ 155.0, -425.0 ], [ 165.0, -425.0 ] ] ] ]  }
  }, {  
  "id" : 3,  "name" : "Lower Right",  
  "polygons" : {    "type" : "MultiPolygon",    "coordinates" : [ [ [ [ 315.0, -395.0 ], [ 325.0, -395.0 ], [ 325.0, -385.0 ], [ 315.0, -385.0 ], [ 315.0, -395.0 ] ] ] ]  }
} ]

For example, a TQL statement in a Template Text Panel applied to neighborhoods creates separate instances for 'East Side' and 'West Side'.

The TQL statement

SELECT_NAME_WHERE_AREA_IS_XC

for the Text Panel linked to Neighborhood "East Side" is internally replaced with a list of TQL statements, separated by commas,

[ SELECT_NAME_WHERE_AREA_IS_1, SELECT_NAME_WHERE_AREA_IS_3 ]

Its result will be a list of names, separated by commas; for example:

[ "Upper Right", "Lower Right" ]

Notes

  • The following variants on XC exist:
    • XCA: A combination between XC and XA.
    • XCK: A combination between XC and XK.

See also

API Endpoints