UserArea example

This section shows an example of a UserArea:

  • The first codeblock shows the XML structure of the UserArea, which is created by the BOD or BDE extension.
  • The second codeblock shows the Add Calculated Fields hook that built this User Area.

UserArea

<UserArea>
 <Property><NameValue name="NegotiationDate"
  type="DateTimeType">2013-05-16T07:46:37Z</NameValue>
 </Property>
 <Property><NameValue name="NegotiationLevel"
  type="EnumerationType">hard</NameValue>
 </Property>
 <Property><NameValue name="StringElement"
  type="StringType">stringValue</NameValue>
 </Property>
 <Property><NameValue name="IntegerElement"
  type="IntegerNumericType">1</NameValue>
 </Property>
 <Property><NameValue name="NumericElement"
  type="NumericType">123.45</NameValue>
 </Property>
 <Property><NameValue name="DateElement"
  type="DateTimeType">2016-07-08T07:38:28Z</NameValue>
 </Property>
 <Property><NameValue name="CheckboxElement"
  type="IndicatorType">true</NameValue>
 </Property>
.<Property><NameValue name="LongBpName"
  type="StringType">LONG BP NAME</NameValue>
 </Property>
 <Property><NameValue name="Name"
  type="StringType">BP Name</NameValue>
 </Property>
 <Property><NameValue name="DatatypeOfOrno"
  type="StringType">DB.STRING</NameValue>
 </Property>
 <MyOwnUserAreaExtension>
  <LongName>LONG BP NAME</LongName>
  <Name>BP Name</Name>
 </MyOwnUserAreaExtension>
</UserArea>

Add Calculated Fields hook

Negotiation Date and Negotiation Level are
selected in the Field List of the 
PurchaseOrderBOD Component
  long                    ret, header.xml
  long                    xmlnode
  long                    childnode
  domain  tcorno          orno
  domain  tccom.bpid      otbp
  addValue("StringElement", "stringValue", "String")
  addValue("IntegerElement", "1", "Integer")
  addValue("NumericElement", "123.45", "Numeric")
  addValue("DateElement",
         utc.to.iso(utc.num(), UTC_ISO_Z), "Date")
  addValue("CheckboxElement", "true", "Checkbox")
  ret = getTableIdentifiers.PurchaseOrderBOD(
         header.xml)
  orno = 
  getIdentifierValueFromIdentifierStructure(
         header.xml, "tdpur400", "orno")
  select  tdpur400.otbp:otbp
  from    tdpur400
  where   tdpur400.orno = :orno
  selectdo
    select  tccom100.*
    from    tccom100
    where   tccom100.bpid = :tdpur400.otbp
    selectdo
      addValue("LongBpName", tccom100.cdf_lnam, 
               "String")
      addValue("Name", tccom100.nama, "String")
    endselect
  endselect
 addValue("DatatypeOfOrno",
getIdentifierDataTypeFromIdentifierStructure(
 header.xml, "tdpur400", "orno"), "String")
 xmlnode = xmlNewNode(
        "MyOwnUserAreaExtension")
 childnode = xmlNewDataElement("LongName",
         tccom100.cdf_lnam, xmlnode)
 childnode = xmlNewDataElement("Name",
         tccom100.nama, xmlnode)
 addXML(xmlnode)