Issues with certain fields in HPRMAdditionalFields.xml

  • KM02229603
  • 08-Apr-2016
  • 08-Apr-2016

This document has not been formally reviewed for accuracy and is provided "as is" for your convenience.

Summary

Information about fields in HPRMAdditionalFields.xml used to send additional data to HP RM.

Question

Issue 1: If additional field has space, the value entered in HPRMAdditionalFields.xml does not display in HP RM.

Issue 2: If additional field is of type Text, the value entered in HPRMAdditionalFields.xml does not display in HP RM.

Issue 3: What different formats can be used for Date fields and would be the sample DEFAULTS for that?

Issue 4: What effect false or true have for:

<FIELD MANDATORY="false" PASSBY="false" USERDEFINED="true">

Answer

Issue 1: If additional field has space, the value entered in HPRMAdditionalFields.xml does not display in HP RM.

a. It seems resolution is to use Additional Field Method name instead of just name.
How to check the method name for Additional field in RM.

1. Search Records, Click on Quick select for Search By.
Search By

  2. Choose Search Method - By Category

 Category

3. Expand Custom Properties in RM 8.2 and above, Expand Additional fields in RM version < 8.2
4. Look for first column which is the Method Name of the additional field.
5. Usually it is without spaces.
6. So Method Name for Additional field Source Database would be SourceDatabase.

Method

b. The same results you can get using the Additional Field properties:

How to check the Abbreviated name for Additional field in RM database. 

  SELECT EXFIELDABBREV
  FROM <RM user>.TSEXFIELD
  WHERE EXFIELDNAME = 'Additional Field name';

 

 

Issue 2: If additional field is of type Text, the value entered in HPRMAdditionalFields.xml does not display in HP RM.

RM Additional field of type Text needs to be defined as type String in HPRMAdditionalFields.xml. So if Product is an user defined additional field of Type Text in RM, user will need below entry in HPRMAdditionalFields.xml on the SDM side.

<FIELD MANDATORY="false" PASSBY="false" USERDEFINED="true">
<NAME>Product</NAME>
<TYPE>String</TYPE>
<DEFAULT>Demarc</DEFAULT>
</FIELD>

Issue 3: What different formats can be used for Date fields and would be the sample DEFAULTS for that?

SDM uses java Class SimpleDateFormat (java.text.SimpleDateFormat) to parse the dates formats to a string used by RM.
So, the format field used in HPRMAdditionalFields.xml is specified by date and time pattern strings.

This is the list of supported parent letters:

Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800

This is a list of tested examples:

Date and Time Pattern Result
"yyyy.MM.dd G 'at' HH:mm:ss z" 2001.07.04 AD at 12:08:56 PDT
"EEE, MMM d, ''yy" Wed, Jul 4, '01
"h:mm a" 12:08 PM
"hh 'o''clock' a, zzzz" 12 o'clock PM, Pacific Daylight Time
"K:mm a, z" 0:08 PM, PDT
"yyyyy.MMMMM.dd GGG hh:mm aaa" 02001.July.04 AD 12:08 PM
"EEE, d MMM yyyy HH:mm:ss Z" Wed, 4 Jul 2001 12:08:56 -0700
"yyMMddHHmmssZ" 010704120856-0700
"yyyy-MM-dd'T'HH:mm:ss.SSSZ" 2001-07-04T12:08:56.235-0700

 

For a date = 2001.07.04 at format yyyy-MM-dd'T'HH:mm:ss.SSSZ , SDM will parse to RM the following value:

                   <FIELD MANDATORY="false" PASSBY="false" USERDEFINED="true">
                                <NAME>RetireDateTime</NAME>
                                  <TYPE>Date</TYPE>
                                <FORMAT><![CDATA[yyyy-MM-dd'T'HH:mm:ss.SSSZ]]></FORMAT>
                                <DEFAULT>2001-07-04T12:08:56.235-0700</DEFAULT>
                  </FIELD>

CDATA is necessary since most of the date time formats have special characters, which without CDATA they will be parsed as XML.
These are the results:
 
SELECT UDVFIELDVAL
FROM TSUDFDATEV
WHERE UDVOBJECTURI =521;


UDVFIELDVAL  
---------------
20010704180000M       -> Only date
200107041908561         -> Date / Time

You can access http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html for further information about java Class SimpleDateFormat.

Issue 4: What effect false or true have for:

<FIELD MANDATORY="false" PASSBY="false" USERDEFINED="true">

• MANDATORY: “True” value is reserved for “mandatory fields”, however they are not used since SDM takes that values from the repository (WebConsole HP RM configuration).
The mandatory fields are:
         o CLASSIFICATION
         o DOCUMENT_RECORD_TYPE
         o CONTAINER_RECORD_TYPE
• PASSBY: If the value is set as “true”, SDM ignores it doesn’t send the value to RM.
• USERDEFINED:  Should be set as “Yes” if the field is related to a RM Additional Field.

Please note that SDM strongly recommends “EDIT ONLY DEFAULT VALUES”.