pyGetTypeForProperty RUF always returns null

Hi,

Greetings. Hope you are doing well! I am trying to get a data type of a property in runtime by using Pega’s RUF pyGetTypeForProperty however when i tried this in a Java step, i always get returned as null

oLog.infoForced(“Field Name” +FieldName);
String type = pega_rulesengine_reportingutils.pyGetTypeForProperty(“.” +FieldName,tools);
oLog.infoForced("Bharat Test "+type);

Same RUF when using in a expression builder, i see the placeholder being replaced as per the data type of function.

Did anyone know how to get value instead of null?

I am using Pega 8.8.2

Regards,

Bharat

Hi@KOMARINA

Use the below code to get the property mode / data type

tools.getDictionary().fromDefinition(sPropClass, sPropName, “pyPropertyMode”);

or ideally the function pzDXAPIDeterminePropMode should get you what you are looking for, though I havent tested it myself.