Skip to content

mapping.findUsingRight

Returns the definition for a row of the mapping table as a String of JSON Data.

js
mapping.findUsingRight(mappingName, rightKeys);

Parameters

  • mappingName - An identifier used to find the target mapping.
  • rightKeys - An Array of strings representing elements from each of the mapping dimensions on the right side of the mapping table in order.

Example

js
let row = JSON.parse(mapping.findUsingRight("Time to Year and Month", ["2017", "Jul"]));
console.log(row);

This returns a row mapping (if it exists) with the right keys being equal to the 2017 element form the Year dimension and Jul element from the Month dimension. The resulting output could appear as follows:

json
{
    "id": 1,
    "left": [
        "FY2017 - Jul"
    ],
    "right": [
        "2017",
        "Jul"
    ]
}