Skip to content

mapping.findUsingRight ​

Finds a mapping row by its right keys.

js
mapping.findUsingRight(mappingName, rightKeys)

Parameters ​

ParameterTypeDescription
mappingNamestringThe mapping's name or id.
rightKeysstring[]One element for each dimension on the right side, in order.

Returns ​

string | null

The row as a JSON string, with its id, left keys and right keys. Use JSON.parse() to read it. Returns null when no row matches.

Examples ​

js
const row = JSON.parse(mapping.findUsingRight("Time to Year and Month", ["2017", "Jul"]));
console.log(row);
json
{
    "id": 1,
    "left": [
        "FY2017 - Jul"
    ],
    "right": [
        "2017",
        "Jul"
    ]
}