Skip to content

mapping.findUsingLeft ​

Finds the mapping rows that match the given left keys.

js
mapping.findUsingLeft(mappingName, leftKeys)

Parameters ​

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

Returns ​

string | null

The matching rows as a JSON string, read with JSON.parse(). It's always an array, even when only one row matches, and each row has its id, left keys and right keys. Returns null when no row matches. To get a single row instead, use mapping.findFirstUsingLeft.

Examples ​

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