--- title: "CompositeLongKey" slug: "compositelongkey" updated: 2022-02-10T13:40:36Z published: 2022-02-10T13:40:36Z canonical: "docs.datajet.app/compositelongkey" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # CompositeLongKey ## General: CompositeLongKey ## Combined the specified low (L) and high(H) continuous integer fields into a continuous long integer field. The intermediate field is defined as (L*M)+H ## Purpose Use this function to: - Combine two Integer keys into a single Long key. ## Return Value | Property | Value | | --- | --- | | **FieldType** | LongInteger | | **FieldSize** | Big Integer field with large unknown number of unique values | | **DataType** | Continuous | | **DataSize** | LongInteger | ```shell Example Return Value: ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/Gen_CompLongKey_Sample.PNG) ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Filter** | “dataset”: {DataSet_JSON} | Optional. If a filter is applied, records not in the filter recordset will be returned as null. | | **Function** | "function":"compositelongkey" | CompositeLongKey | | **High Key** | “p1”: HighKeyFieldName | Required. - **Data Type:** Discrete - **Field Type:** Integer / LongInteger - **Data Size:** Integer DataSize must be INTEGER - supplying a field that is a SHORT or a LONG-INTEGER will generate an error. | | **Low Key** | “p2”: LowKeyFieldName | Required. - **Data Type:** Discrete - **Field Type:** Integer / LongInteger - **Data Size:** Integer DataSize must be INTEGER - supplying a field that is a SHORT or a LONG-INTEGER will generate an error. | | **Multiplier** | “p3”: MultiplierFieldName | Required. - **Data Type:** Discrete - **Field Type:** Integer / LongInteger | ## JSON Sample ```json { "method": "BuildBakedField", "project": "D3", "targetTable": "transactions", "overwrite": true, "name": "CompLongKey", "function": "compositelongkey", "p1": "cid", "p2": "castprice", "p3": "Year" } ``` **Usage Notes** See Also: - Engineering | Expression Field - CombinedIndex (General Functions) ## Example | Example | Details | | --- | --- | | **Description** | Combine integer fields to create key | | **Input** | - Table: = [transactions] - Filter: = [No Filter] - **Function: = CompositeLongKey** - High Key:= cid - Low Key:= castprice - Multiplier:= Year - Name: =key-cid-price-year | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/Gen_CompLongKey_Example.png) |