Determining a Data View's Named Parameters

You can determine the named parameters associated with a data view without having to retrieve all of the details of the data view's conditions.

For example, assume a data view had previously been created with a named parameter in the condition, as follows (using a SOAP API example):

<condition xsi:type="api:AttributeSearchCondition" xmlns:api="http://api.bds.tibco.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <attrPath>lineItems[0].price</attrPath>                  
      <operator>GTE</operator>
      <parameterName>MinValue</parameterName>
</condition>
You can then retrieve the named parameter, and its data type, by setting the viewDetailsRequirement attribute to one of the following values when calling getDataViewDetails:
  • NAME_AND_PARAMETERS - Returns only the name of the data view, its named parameters, and the data types for the named parameters.
  • NAME_DESCRIPTION_AND_PARAMETERS - Returns only the name of the data view, the data view's description, its named parameters, and the data types for the named parameters.

For example, this request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bds.tibco.com">
   <soapenv:Header/>
   <soapenv:Body>
      <api:GetDataViewDetailsRequest>
         <viewID>1</viewID>
         <viewDetailsRequirement>NAME_AND_PARAMETERS</viewDetailsRequirement>
      </api:GetDataViewDetailsRequest>
   </soapenv:Body>
</soapenv:Envelope>

Returns the following:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <GetDataViewDetailsResponse xmlns="http://api.bds.tibco.com">
         <result xmlns="">
            <viewID>1</viewID>
            <specification>
               <name>Large Orders</name>
            </specification>
            <parameter>
               <name>MinValue</name>
               <type>ATTR_DECIMAL</type>
            </parameter>
         </result>
      </GetDataViewDetailsResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is telling you that the data view named "Large Orders" has a single named parameter of "MinValue" whose data type is ATTR_DECIMAL. You can then call getCaseReferencesForDataView, specifying the name "Large Orders", including the namedParameterAssignment, which sets the MinValue to the desired value:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.bds.tibco.com">
   <soapenv:Header/>
   <soapenv:Body>
      <api:GetCaseReferencesForDataViewRequest>
         <viewName>Large Orders</viewName>
         <namedParameterAssignment>
            <name>MinValue</name>
            <value>2000</value>
         </namedParameterAssignment>
       </api:GetCaseReferencesForDataViewRequest>
   </soapenv:Body>
</soapenv:Envelope>
Note: If a value is included in the condition, it is used as the default value if one is not specified in the call to getCaseReferencesForDataView. For example:

<condition xsi:type="api:AttributeSearchCondition" xmlns:api="http://api.bds.tibco.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <attrPath>lineItems[0].price</attrPath>                  
      <operator>GTE</operator>
      <value>1000</value>
      <parameterName>MinValue</parameterName>
</condition>

This causes the default value to be 1000 if it is not specified in getCaseReferencesForDataView.