diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/AbstractEntityAdaptor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/AbstractEntityAdaptor.java
index 48d6cc8f94b781fef75603079b4abeaf21f47ef9..3c26663825a9190683b3610037979025e6da645c 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/AbstractEntityAdaptor.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/AbstractEntityAdaptor.java
@@ -45,6 +45,11 @@ public class AbstractEntityAdaptor implements IEntityAdaptor
     {
         for (EntityPropertyPE property : propertiesHolder.getProperties())
         {
+            if (property.getEntityTypePropertyType().isDynamic())
+            {
+                // values of dynamic properties can't be referred to - it wouldn't be deterministic
+                continue;
+            }
             final PropertyTypePE propertyType =
                     property.getEntityTypePropertyType().getPropertyType();
             final String propertyTypeCode = propertyType.getCode();
@@ -82,7 +87,7 @@ public class AbstractEntityAdaptor implements IEntityAdaptor
 
     public IEntityPropertyAdaptor property(String propertyTypeCode)
     {
-        return propertiesByCode.get(propertyTypeCode);
+        return propertiesByCode.get(propertyTypeCode.toUpperCase());
     }
 
     public String propertyValue(String propertyTypeCode)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicConstant.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicConstant.java
index ec6f695cbbcd6358f679ec581eae3e273e77232d..ac26dc4a7bf15576330e04d48b049f4d0c0164e0 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicConstant.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/basic/BasicConstant.java
@@ -38,10 +38,10 @@ public class BasicConstant
     /** Prefix of internal namespace vocabulary code. */
     public static final String INTERNAL_NAMESPACE_PREFIX = "$";
 
-    private static final int UNI_REPLACEMENT_CHAR = 0xFFFD;
+    private static final char UNI_REPLACEMENT_CHAR = 0xFFFD;
 
     /** Prefix of property value that contains error message. */
-    public static final String ERROR_PROPERTY_PREFIX = "" + (char) UNI_REPLACEMENT_CHAR;
+    public static final String ERROR_PROPERTY_PREFIX = "" + UNI_REPLACEMENT_CHAR;
 
     // placeholder
     /** Prefix of property value that contains error message. */
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/DynamicPropertyCalculatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/DynamicPropertyCalculatorTest.java
index 75d9fabaeeaa54303e7c162c09036a333b591aa9..1f1d225f67232c53a0680cd7517c36df883b197c 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/DynamicPropertyCalculatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/dynamic_property/calculator/DynamicPropertyCalculatorTest.java
@@ -52,9 +52,9 @@ public class DynamicPropertyCalculatorTest extends AssertJUnit
 
         final String entityCode = "ecode";
 
-        IEntityPropertyAdaptor p1 = createProperty("p1", "v1");
-        IEntityPropertyAdaptor p21 = createProperty("p2", "v21");
-        IEntityPropertyAdaptor p22 = createProperty("p2", "v22");
+        IEntityPropertyAdaptor p1 = createProperty("P1", "v1");
+        IEntityPropertyAdaptor p21 = createProperty("P2", "v21");
+        IEntityPropertyAdaptor p22 = createProperty("P2", "v22");
 
         calculator.setEntity(createEntity(entityCode, null));
         assertEquals("", calculator.evalAsString());