Map Get / Replace Value
- Updated2025-03-14
- 4 minute(s) read
Use this border node to access and modify a value in a map without copying the value out of the map. Use the border node on the left side of the structure to retrieve a value in a map. Use the border node on the right side of the structure to modify or discard the retrieved value.
To place this border node on the In Place Element structure, right-click the border of an In Place Element structure and select the Add Map Get / Replace Value option from the shortcut menu. Alternatively, you can use the In Place Map Access VI, which places an In Place Element structure on the block diagram with this border node added.

Inputs/Outputs
![]() map specifies the map in which you want to look for a key. This input accepts a map of any data type. The default data type is a map of 32-bit signed integers. ![]() key specifies the key to look for in the map. The key must be of the same data type as the existing keys in the map. ![]() default value specifies the value to return in value if the specified key does not exist in the map. This input must be of the same data type as the existing values in the map. ![]() key not found? returns TRUE if map does not include an entry with the specified key. Otherwise, key not found? returns FALSE . This output exists on both the left and right border nodes. The two key not found? outputs return the same value. ![]() value returns the value of the entry with the associated key if key not found? is FALSE. If key not found? is TRUE, this output returns the value in default value. ![]() action specifies the operation to perform on the map based on the TRUE or FALSE value of key not found?. This input assumes the value 0 if unwired.
![]() value specifies the new value of the entry with the associated key. ![]() map returns the resulting map. ![]() key returns the same value as the key input on the left side of the border node. ![]() |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Collections\Map Collection - Word Counting.vi
- labview\examples\Design Patterns\Registration Map\Registration Map Usage.lvproj