Example - Specifying How Values of Lists of Values are Returned

A query may be given to specify how LOV values will be returned, and/or refreshed (if the LOV allows it).

Request

PUT <webiURL>/documents/{documentId}/parameters

Where:

  • {documentId} is the document identifier retrieved from the list of documents

Request body (optional):

</parameters> 
    <parameter>
        <id>1</id>
        <answer>
            <info>
                <lov>
                    <query intervalId="2" intervalSize="6" refresh="true">
                        <sort order="Descending"/>
                        <search>pattern</search>
                    </query>
                </lov>
            </info>
        </answer>
    </parameter>
</parameters> 

Where :

  • intervalId: (type=integer, optional) specifies which values interval should be returned. An error is returned if this index is out of range (depending of values count).
  • intervalSize: (type=integer, optional) specifies how many (and which) values should be returned.
  • refresh: (type=boolean, optional) refreshes the LOV values. An error is returned if the LOV does not allow refreshing.
  • sort: (type=string, values="None" or "Ascending", default="Descending", optional)
  • search pattern: (type=string, optional) the following wildcard characters may be used in the pattern string: "?" for 0 or 1 character, and "*" for 0 or n characters. For example, "M?Gregor" yields to the value McGregor, and "M*Gregor" to the values McGregor and MacGregor.
Response

Response type: application/xml or application/json

Response body:

<parameters>
    <parameter optional="false" type="prompt" dpId="DP0">
        <id>1</id>
        <technicalName>Select Max Age</technicalName>
        <name>Select Max Age</name>
        <answer constrained="false" type="Numeric">
            <info cardinality="Single">
                <lov hierarchical="false" partial="false" refreshable="true">
                    <id>UNIVERSELOV_DS0.DO58</id>
                    <intervals>
                        <interval id="0">
                            <value>74</value>
                            <value>64</value>
                        </interval>
                        <interval id="1">
                            <value>63</value>
                            <value>45</value>
                        </interval>
                        <interval id="2">
                            <value>42</value>
                            <value>24</value>
                        </interval>
                        <interval id="3">
                            <value>22</value>
                            <value>18</value>
                        </interval>
                    </intervals>
                    <values>
                        <value>42</value>
                        <value>38</value>
                        <value>36</value>
                        <value>34</value>
                        <value>29</value>
                        <value>24</value>
                    </values>
                    <columns mappingId="0">
                        <column id="0" type="double">Age </column>
                    </columns>
                </lov>
                <previous>
                    <value>67</value>
                </previous>
            </info>
            <values>
                <value>67</value>
            </values>
        </answer>
    </parameter>
    . . .
</parameters>
Note
  • Refreshing a Web Intelligence document with multi-columns parameters has to be done the same way as for single-column values, by giving only the cell(s) whose index matches the mappingId.
  • partial="true" in LOV information means that only a part of the LOV values can be returned because the LOV size is limited by server settings or the universe's query limit.