TranslateCode
Entity codes are associated with specific code types. The same entity code may be used in multiple systems, such as StockExchange1 and StockExchange2. The TranslateCode()
function converts an entity code to its equivalent in another system.
Syntax:
Qx.TranslateCode(Entity, Code Types, Headers, ShowError)
- In Excel with Quintessence addin versions prior to 25.1, use:
TranslateCode()
- In the Quintessence Editor (Studio) using Quintessence language, use:
TranslateCode()
- In the Quintessence Editor (Studio) using Python language, use:
Qx.TranslateCode()
ⓘ See parameter descriptions
Entity | An entity in the Quintessence database is any element with associated data that is identified by a code, such as an instrument, portfolio, country, or manager. |
Code Types | The code type to use when translating the entity code. If multiple code types are required, separate them with commas. |
Headers (optional) | Specifies whether to include headers in the output. Options are none, column, row or both. |
ShowError (optional) | If TRUE, an error message is displayed when the function fails. |
Remarks:
- Unless changed by an administrator, the default parameters are:
- Headers:
none
- Headers:
Examples:
The examples provided below are based on fictitious data for illustrative purposes only.
> Example 1: A single translation from one code type to another.
Suppose we want to find the code for GB0000XYZ999 using the code type StockExchange1 Alpha Code.
=Qx.TranslateCode("GB0000XYZ999","StockExchange1 Alpha Code","row")
GB0000XYZ999 | GTE |
> Example 2: Multiple translations to multiple code types
=Qx.TranslateCode("GTE,JWQ","SecuritiesIDNumber1, StockExchange1 Alpha Code","both")
SecuritiesIDNumber1 | StockExchange1 Alpha Code | |
GTE | GB0000XYZ999 | GTE |
JWQ | GB0000XYZ111 | JWQ |
> Example 3: Request the database EntityId.
This functionality is available only in Quintessence 23.1 and later. Suppose we want to find the database ID of the entity GB0000XYZ999 stored in the Quintessence database.
=Qx.TranslateCode("GB0000XYZ999","Quintessence Id")
3992 |