The JPOs used with the preProcess JPO, cancelProcess JPO and postProcess
JPO parameter get the complete form definition from the key formMap.
fieldMap: fieldMap contains the field settings
and the field values based on the type of JPO program executing per the
settings defined for the field. The table below describes the list of
JPO programs used with the settings, which have fieldMap as an argument.
The fieldMap is a key-value pair and the following table describes
its sample structure. Depending on the JPO method getting called, the
fieldMap key-value pair available will differ.
This example shows how you can read the field settings of the individual
field from the fieldMap.
// Getting the fieldMap
HashMap programMap = (HashMap) JPO.unpackArgs(args);
HashMap fieldMap = (HashMap) programMap.get("fieldMap");
// Getting the first-level key-value pair from fieldMap
String field_expression = (String) fieldMap.get("expression_businessobject");
String fieldName = (String) fieldMap.get("name");
String strLabel = (String) fieldMap.get("label");
//Getting the Settings key-value pair from fieldMap which is inside nested Hashmap
HashMap settingsMap = (HashMap) fieldMap.get("settings");?
String suiteKey = (String) settingsMap.get("Registered Suite");?
String fieldType = (String) settingsMap.get("Field Type");