Dimension Write

Creates or changes a dimension. An existing dimension is always overwritten, but parts can be taken over by various ways using dimension and hierarchy templates.

Example request with an implicit hierarchy and BreakOnError

In this request, replace \t with an actual horizontal tabulator.

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1" Class="Dimension" Method="Write">
    <Alea:Dimension Name="DimTest" FirstBatch="true" LastBatch="true" BreakOnError="false" Delimiter="\t">
      <Alea:Elements>N\tActual
N\tBudget
C\tVariance
S\tStringElem
N\tFault[Elem
C\tVariance
\tActual
\tBudget\t-1</Alea:Elements>
    </Alea:Dimension>
  </Alea:Request>
</Alea:Document>

The <Alea:Elements> tag contains:

  • The list of the elements, with their types and names. The possible types are:
    • N (base)
    • C (consolidated)
    • S (string)
  • The relations between elements.
    • Child elements are listed below their parent element. In the example, Actual and Budget are children of Variance.
    • Optionally, the element weight. The default is 1.
    • The alternate format is: !\tParent\tChild<\tweight>.

Further characteristics of the <Alea:Elements> tag:

  • By default, the fields of a line are separated by a horizontal tabulator.
  • The separator can be changed using the Delimiter attribute of the <Alea:Dimension> tag.
  • Each line, except optionally the last one, ends with a line break.
  • No more than one line break and no spaces are allowed between the opening <Alea:Elements> tag and the first line.
  • No more than one line break and no spaces are allowed between the last line and the closing </Alea:Elements> tag.

This request contains an element with the illegal character "[". Because BreakOnError is set to "false", the request does not fail, but creates or changes the dimension omitting the corresponding element. The offending element is returned including the error code and line number.

Answer if BreakOnError="false"

Horizontal tabulators are returned as such, not as \t.

<Alea:Document xmlns:Alea="http://www.misag.com"> 
  <Alea:Request RequestID="1">
    <Alea:Return> 
      <Alea:Dimension Name="DimTest"> 
        <Alea:Hierarchy Name="DimTest"> 
          <Alea:Elements LinesCount="1">196\t6\tN\tFault[Elem</Alea:Elements> 
        </Alea:Hierarchy> 
      </Alea:Dimension> 
    </Alea:Return>   
  </Alea:Request> 
</Alea:Document>

If BreakOnError is set to "true", this request fails, and the dimension is not created or changed. The default for BreakOnError is "false".

Answer if BreakOnError="true"

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="1">
    <Alea:Return>
      <Alea:Dimension Name="DimTest">
        <Alea:Hierarchy Name="DimTest" />
      </Alea:Dimension>
    </Alea:Return>
    <Alea:Error ErrorID="196" ErrorPosition="6" />
  </Alea:Request>
</Alea:Document>