ID query (Excel)

From Tygron Preview Support Wiki
Revision as of 15:25, 3 March 2021 by Rudolf@tygron.nl (talk | contribs) (Created page with "File:ExcelIDs.jpg|framed|right|The <code>ID</code> in the query will be replaced with the specific AREA the file is applied to, and thus the name of the AREA concerned is re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The ID in the query will be replaced with the specific AREA the file is applied to, and thus the name of the AREA concerned is retrieved.

Excel files can be used for general calculations which are basically predictable. You always know which elements in the world you want to retrieve or manipulate. However, in some cases, you may not know that beforehand. Examples are when an Excel is used for a Template Panel or a Zoning permit calculation. In these situations, you may likely want a query which refers to whatever element the Excel is applied to.

This can be done using an ID query. For any given query which refers to an Item by its ID, that specific ID can be replaced by ID. Starting with a query of the specific form:

SELECT_ATTRIBUTE_WHERE_NAME_IS_ACTIVE_AND_NEIGHBORHOOD_IS_1

This query can be read as "Get the value of the ACTIVE attribute of neighborhood with ID 1". The query can rewritten to the following form:

SELECT_ATTRIBUTE_WHERE_NAME_IS_ACTIVE_AND_NEIGHBORHOOD_IS_ID

This query can instead be read as "Get the value of the ACTIVE attribute of the applicable neighborhood. The context in which the Excel is used will dictate which Item is specifically "applicable",

Only one ID term may exist in a query, but multiple ID queries may exist in an Excel file.