MapPropertyValue Function

Overview

The MapPropertyValue function is used within property expressions to translate one value into another. This function enables the mapping of specific codes or identifiers to corresponding values, allowing for customized data interpretation or representation.

Parameters

  • Property Code:
    The unique identifier or code of the property whose value needs to be mapped. For a complete list and detailed descriptions of property codes, refer to the GetProperty page.

  • Mapping String:
    A tab-delimited string in CSV (Comma-Separated Values) format that includes two columns:

    1. First Column: The value (code) received from the mapped property.

    2. Second Column: The value that the function should return after mapping.

    Tip: To insert CSV text, create a two-column table in Excel, copy it, and paste it directly into the formula. Ensure there are no spaces or line breaks between the first and last quote marks.

Return Value

The MapPropertyValue function returns values as strings. If the mapped values need to be used in numeric calculations, apply the TextToNumber function to convert these strings into numeric format.

Examples

Mapping Node IDs to Their Names

MapPropertyValue("nodeId";
"2734	AMC
3050	BPM
3046	SPS")

This example translates node IDs into their corresponding names. If the value in the property with code "nodeId" matches any of the provided IDs, the function returns the associated name.

Mapping Confidence Levels to Descriptive Labels

MapPropertyValue("confidence_level";
"1-20 Very low
21-40 Low 
41-60 Moderate
61-80 High
81-100  Very High")

Here, confidence levels are mapped to descriptive labels. If the value in the "confidence_level" property falls within a specified range, it returns the corresponding label.

Example of Numeric Calculation Using Mapped Values

=(TextToNumber(MapPropertyValue("likelihood";
"rare	1
unlikely	2
possible	3
likely	4
almost_certain	5")))*(TextToNumber(MapPropertyValue("impact";
"insignificant	1
minor	2
moderate	3
major	4
catastrophic	5")))

In this example, the MapPropertyValue function is used to calculate a numeric result based on selections from two properties. The values from the "likelihood" and "impact" properties are mapped to numeric values, which are then multiplied together to produce the final result.