diff --git a/MeshLib/Properties.cpp b/MeshLib/Properties.cpp
index ab46c0179f1688df3a72ca991ce4bd62fe996019..7da4b8753c9fb2b48836c35e396121299454572a 100644
--- a/MeshLib/Properties.cpp
+++ b/MeshLib/Properties.cpp
@@ -175,33 +175,4 @@ std::map<std::string, PropertyVectorBase*>::size_type Properties::size(
                     { return p.second->getMeshItemType() == mesh_item_type; });
 }
 
-std::string getBulkIDString(MeshItemType mesh_item_type)
-{
-    switch (mesh_item_type)
-    {
-        case MeshItemType::Node:
-            return "bulk_node_ids";
-            break;
-        case MeshItemType::Cell:
-            return "bulk_element_ids";
-            break;
-        case MeshItemType::Edge:
-            return "bulk_edge_ids";
-            break;
-        case MeshItemType::Face:
-            return "bulk_face_ids";
-            break;
-        case MeshItemType::IntegrationPoint:
-            OGS_FATAL("MeshItemType::IntegrationPoint is not handled.");
-            return "";
-            break;
-        default:
-            OGS_FATAL(
-                "Unknown mesh item type. At the moment only for mesh item "
-                "types 'Node', 'Cell', and 'Face' mapping names are "
-                "specified.");
-            return "";
-    }
-}
-
 }  // end namespace MeshLib
diff --git a/MeshLib/Properties.h b/MeshLib/Properties.h
index 1e4b0ca46a76e97958e9d9500d3e77e3dd790b15..3355e2a125704810fec1db834d2bb88bc509fd3f 100644
--- a/MeshLib/Properties.h
+++ b/MeshLib/Properties.h
@@ -177,7 +177,34 @@ void applyToPropertyVectors(Properties const& properties, Function f);
 /// MeshItemType::Node -> bulk_node_ids
 /// MeshItemType::Cell -> bulk_element_ids
 /// MeshItemType::Face -> bulk_face_ids
-std::string getBulkIDString(MeshItemType mesh_item_type);
+constexpr std::string_view getBulkIDString(MeshItemType mesh_item_type)
+{
+    switch (mesh_item_type)
+    {
+        case MeshItemType::Node:
+            return "bulk_node_ids";
+            break;
+        case MeshItemType::Cell:
+            return "bulk_element_ids";
+            break;
+        case MeshItemType::Edge:
+            return "bulk_edge_ids";
+            break;
+        case MeshItemType::Face:
+            return "bulk_face_ids";
+            break;
+        case MeshItemType::IntegrationPoint:
+            OGS_FATAL("MeshItemType::IntegrationPoint is not handled.");
+            return "";
+            break;
+        default:
+            OGS_FATAL(
+                "Unknown mesh item type. At the moment only for mesh item "
+                "types 'Node', 'Cell', and 'Face' mapping names are "
+                "specified.");
+            return "";
+    }
+}
 
 #include "Properties-impl.h"