Example - Refreshing a Document with a Hierarchical Parameter of Multiple Columns

A first GET .../parameters call returns a list of values for a specific parameter of type prompt.

The response contains the prompts at the first level in the hierarchy (hierarchical="true"). There is only one column of type String. final="false" means the value is a node of the hierarchy, while final="true" or no tag means value is a leaf.

Response:

<parameters>
    <parameter optional="false" type="prompt" dpId="DP0">
        <id>0</id>
        <technicalName>Enter one or more Invoice Date values</technicalName>
        <name>Enter one or more Invoice Date values</name>
        <answer constrained="false" type="DateTime">
            <info cardinality="Multiple">
                <lov hierarchical="true" partial="false" refreshable="true" searchable="false">
                    <id>UNIVERSELOV_DS0.DO119</id>
                    <values>
                        <value final="false">FY1992</value>
                        <value final="false">FY1993</value>
                        <value final="false">FY1994</value>
                        <value final="false">FY1995</value>
                    </values>
                    <columns mappingId="0">
                        <column id="0" type="String">Year</column>
                    </columns>
                </lov>
            </info>
        </answer>
    </parameter>
</parameters>   

In the first PUT call, a value of the first level of the list of values is given as answer to the parameter. Hierarchical lists of values accept an extra <path> element in the <query> section to go down to each level of the hierarchical parameter. The answer is FY1993.

Request body:

<parameters>
    <parameter>
        <id>0</id>
        <answer>
            <info>
                <lov>
                    <query>
                        <path>
                            <value>FY1993</value>
                        </path>
                    </query>
                </lov>
            </info>
        </answer>
    </parameter>
</parameters>

The response contains the list of values of the second level of the parameter. There are two columns of type String. The first one is used as reference (mappingId="0"). The path attribute of the <lov> element describes the path to any value of the list of values returned in the call. The number represents the data type (0 for string, 1 for date, 2 for numeric).

Response:

<parameters>
    <parameter optional="false" type="prompt" dpId="DP0">
        <id>0</id>
        <technicalName>Enter one or more Invoice Date values</technicalName>
        <name>Enter one or more Invoice Date values</name>
        <answer constrained="false" type="DateTime">
            <info cardinality="Multiple">
                <lov hierarchical="true" partial="false" refreshable="true" searchable="false"
                    path="[[0,\ FY1993]]">
                    <id>UNIVERSELOV_DS0.DO119</id>
                    <cvalues>
                        <cvalue final="false">
                            <column id="0">Q1</column>
                            <column id="1">FY1993</column>
                        </cvalue>
                        <cvalue final="false">
                            <column id="0">Q2</column>
                            <column id="1">FY1993</column>
                        </cvalue>
                        <cvalue final="false">
                            <column id="0">Q3</column>
                            <column id="1">FY1993</column>
                        </cvalue>
                        <cvalue final="false">
                            <column id="0">Q4</column>
                            <column id="1">FY1993</column>
                        </cvalue>
                    </cvalues>
                    <columns mappingId="0">
                        <column id="0" type="String">Quarter</column>
                        <column id="1" type="String">Year</column>
                    </columns>
                </lov>
            </info>
        </answer>
    </parameter>
</parameters>

The PUT calls are repeated until the last level of the parameter.

Request body:

<parameters>
    <parameter>
        <id>0</id>
        <answer>
            <info>
                <lov>
                    <query>
                        <path>
                            <value>FY1993</value>
                            <value>Q2</value>
                            <value>06</value>
                            <value type="Numeric">25</value>
                        </path>
                    </query>
                </lov>
            </info>
        </answer>
    </parameter>
</parameters>

There is no more final="false" attribute in <cvalue> in the response. The last level of the hierarchy is reached, and it contains three columns where the reference is the first one (mappingId="0").

Response:

<parameters>
    <parameter optional="false" type="prompt" dpId="DP0">
        <id>0</id>
        <technicalName>Enter one or more Invoice Date values</technicalName>
        <name>Enter one or more Invoice Date values</name>
        <answer constrained="false" type="DateTime">
            <info cardinality="Multiple">
                <lov hierarchical="true" partial="false" refreshable="true" searchable="false" 
                    path="[[0,\ FY1993], [0,\ Q2], [0,\ 06], [2,\ 25]]">
                    <id>UNIVERSELOV_DS0.DO119</id>
                    <cvalues>
                        <cvalue>
                            <column id="0">1993-06-19T02:00:00.000+02:00</column>
                            <column id="1">06</column>
                            <column id="2">FY1993</column>
                        </cvalue>
                        . . .
                        <cvalue>
                            <column id="0">1995-06-24T02:00:00.000+02:00</column>
                            <column id="1">06</column>
                            <column id="2">FY1995</column>
                        </cvalue>
                    </cvalues>
                    <columns mappingId="0">
                        <column id="0" type="DateTime">Invoice Date</column>
                        <column id="1" type="String">Month</column>
                        <column id="2" type="String">Year</column>
                    </columns>
                </lov>
            </info>
        </answer>
    </parameter>
</parameters>

A last PUT call refreshes the document with a <value>.

Request body:

<parameters>
    <parameter>
        <id>0</id>
        <answer>
            <values>
                <value path='[[0,\ FY1993], [0,\ Q2], [0,\ 06], [2,\ 25]]'>1995-06-19T02:00:00.000+02:00</value>
            </values>
        </answer>
    </parameter>
</parameters>

Response:

<success>
    <message>The resource of type 'Document' with identifier '9586' has been successfully updated.</message>
    <id>9586</id>
</success>