CompositeLongKey
  • 1 Minute to read
  • Dark
    Light
  • PDF

CompositeLongKey

  • Dark
    Light
  • PDF

Article summary

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

PropertyValue
FieldTypeLongInteger
FieldSizeBig Integer field with large unknown number of unique values
DataTypeContinuous
DataSizeLongInteger


Example Return Value: 


Parameters

ParameterJSONDescription
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

{
  "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

ExampleDetails
DescriptionCombine 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





Was this article helpful?

What's Next