Moving an Input Control from a Document to a Report

Usage

Moves an input control from a document to a report. The input control obtains a new identifier after the move, but keeps the same data objects.

You can also specify the report elements to associate with the input control in the request body.

Request

PUT /documents/<documentID>/reports/<reportID>/inputcontrols?fromId=<fromID>

Where:

  • <fromID> is the input control ID in the document

Request body:

<inputcontrol>
    <assignedReportElements>
        <assignedReportElement refId="string"/>

The request body is optional.

You can retrieve the report element identifiers (refId) from the list of report elements (<id>):

GET documents/<documentID>/reports/<reportID>/elements

Response:

<elements>
    <element>
        <id>
Response

Response type: application/xml or application/json

The response is a message stating the success or failure of the request.

Example

Moving an Input Control without Assigned Report Element

PUT /documents/6671/reports/2/inputcontrols?fromId=D.IF0

Response:

<success> 
    <message>The resource of type "Input Control" with identifier "D.IF0" has been successfully moved.</message>  
    <id>R2.IF1</id> 
</success>
The <id> is the new identifier of the input control in the report.

Example

Moving an Input Control with Assigned Report Elements

PUT /documents/6671/reports/2/inputcontrols?fromId=D.IF0

Request body:

<inputcontrol>
    <assignedReportElements>
        <assignedReportElement refId="10"/>
        <assignedReportElement refId="20"/>
        <assignedReportElement refId="19"/>
    </assignedReportElements>
</inputcontrol>

Response:

<success> 
    <message>The resource of type "Input Control" with identifier "D.IF0" has been successfully moved.</message>  
    <id>R2.IF1</id> 
</success>

Another call to retrieve the definition of the report input control shows the assigned report elements:

GET /documents/6671/reports/2/inputcontrols/R2.IF1

Response:

<inputcontrol> 
    <id>R2.IF1</id>  
    <name>Country</name>  
    <comboBox allowAllValuesSelection="true" useCustom="false" operator="Equal"/>  
    <assignedDataObject refId="DP0.DO39" kind="Expression"/>  
    <assignedReportElements> 
        <assignedReportElement refId="10" reference="R2.IF1.T0"/>  
        <assignedReportElement refId="20" reference="R2.IF1.T1"/>  
        <assignedReportElement refId="19" reference="R2.IF1.T2"/> 
    </assignedReportElements> 
</inputcontrol>