Default elements

Each alternate hierarchy has one default element that can be specified by an administrator.

If the default element is not specified, the first root element of a hierarchy is used as default element. Due to different visibility of elements, the first root element can be different for different users. If the user does not have rights to view any element in the hierarchy, error 34 is returned. The error message is: You are not authorized to carry out this operation.

If the default element is specified, this element is used for all users. If the user does not have rights to view this element, the behavior is the same as if no default element would have been specified.

The specified default element is stored in the dimension properties XML structure and can be set by an administrator on the Edit Database dashboard or with the Dimension PutProperties XML function. If the selected element has multiple parents then its first occurrence in the hierarchy is used as default element.

Example

This example sets a default element:

<Alea:Document xmlns:Alea="http://www.misag.com">
  <Alea:Request RequestID="001" Class="Dimension" Method="PutProperties">
    <Alea:Dimension Name="Region">
      <Alea:Properties>
        <Alea:Hierarchy Name="Region">
          <Alea:Properties>
            <Alea:DefaultMember Name="Canada" />
          </Alea:Properties>
        </Alea:Hierarchy>
      </Alea:Properties>
    </Alea:Dimension>
  </Alea:Request>
</Alea:Document>