ID (TQL): Difference between revisions
| (3 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
ID clause values are often used in combination with [[Template Panel]]s; For example: Consider A Template Text Panel applied on Neighborhoods | ID clause values are often used in combination with [[Template Panel]]s; For example: Consider A Template Text Panel applied on Neighborhoods | ||
==Clause Parameters== | |||
The ID value can be used in the following TQL Clause parameters: | |||
<div style="column-count:3"> | |||
*[[Address (TQL Param)]] | |||
*[[Area (TQL Param)]] | |||
*[[Building (TQL Param)]] | |||
*[[Function (TQL Param)]] | |||
*[[Global (TQL Param)]] | |||
*[[Grid (TQL Param)]] | |||
*[[Indicator (TQL Param)]] | |||
*[[Levee (TQL Param)]] | |||
*[[Measure (TQL Param)]] | |||
*[[Neighborhood (TQL Param)]] | |||
*[[Net line (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)]] | |||
*[[Zone (TQL Param)]] | |||
</div> | |||
==Example== | ==Example== | ||
| Line 44: | Line 68: | ||
*[[X (TQL)]] | *[[X (TQL)]] | ||
*[[Item ID]] | *[[Item ID]] | ||
|api=*[[Api session | |api=*[[Api session query]] | ||
}} | }} | ||
{{TQL param nav}} | {{TQL param nav}} | ||
Latest revision as of 14:15, 3 November 2026
Instead of a specific Item ID, you can use 'ID' as a clause parameter value. This is automatically replaced by the ID of the Item containing the TQL statement.
ID clause values are often used in combination with Template Panels; For example: Consider A Template Text Panel applied on Neighborhoods
Clause Parameters
The ID value can be used in the following TQL Clause parameters:
- Address (TQL Param)
- Area (TQL Param)
- Building (TQL Param)
- Function (TQL Param)
- Global (TQL Param)
- Grid (TQL Param)
- Indicator (TQL Param)
- Levee (TQL Param)
- Measure (TQL Param)
- Neighborhood (TQL Param)
- Net line (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)
- Zone (TQL Param)
Example
Consider the following (simplified) Neighborhood data of a project:
[
{ "id" : 0, "name" : "East Side", "attributes": { "INHABITANTS": [ 600.0 ] } },
{ "id" : 1, "name" : "West Side", "attributes": { "INHABITANTS": [ 200.0 ] } }
]
And a Template Text Panel applied on Neighborhoods, resulting in two Text Panel instances:
[
{
"id" : 2, "mapLink" : "NEIGHBORHOODS", "name" : "Template Text Panel", "type" : "TEMPLATE_TEXT_PANEL",
"text" : "Name: $SELECT_NAME_WHERE_NEIGHBORHOOD_IS_ID<br>Inhabitants: $SELECT_ATTRIBUTE_WHERE_NEIGHBORHOOD_IS_ID_AND_NAME_IS_INHABITANTS"
} , {
"contentID" : 0, "contentMapLink" : "NEIGHBORHOODS", "id" : 3, "name" : "Template Text Panel: East Side", "parentID" : 2, "type" : "TEXT_PANEL"
} , {
"contentID" : 1, "contentMapLink" : "NEIGHBORHOODS", "id" : 4, "name" : "Template Text Panel: West Side", "parentID" : 2, "type" : "TEXT_PANEL"
}
]
Since each panel is linked to a particular Neighborhood, through the contentID and contentMapLink parameters, the TQL statement SELECT_NAME_WHERE_NEIGHBORHOOD_IS_ID is internally replaced with:
SELECT_NAME_WHERE_NEIGHBORHOOD_IS_0for the first Text PanelSELECT_NAME_WHERE_NEIGHBORHOOD_IS_1for the second Text Panel
The result of each query will be:
"East Side" and "West Side"
Similarly, the value of the attribute INHABITANTS of the linked Neighborhood can be obtained using
SELECT_ATTRIBUTE_WHERE_NEIGHBORHOOD_IS_ID_AND_NAME_IS_INHABITANTS.