import_allowed_values

This API call imports a tab-delimited file of parent and child values into the ExtraView database. Unlike most API commands (but similar to the add_attachment command), this command is designed to be used within an HTML page.

SYNTAX

<form method="POST" http://www.myserver.com/evj/ExtraView/ev_api.action?
user_id=username
&password=password
 OR [&access_token=token-value]
&statevar=import_allowed_values
&file=filename
&area=area_id
&project=project_id
&parent=parent_dd_name
&child=child_dd_name
&enctype="multipart/form-data">
</form>

The form to be uploaded when prompted by the form must have the following tab-delimited format, where --> represents the tab character:

parent_value1 --> child_value1

parent_value1 --> child_value2

parent_value2 --> child_value3

parent_value2 --> child_value4

NOTES

area_id specifies the area_id into which the allowed values will be imported. You can use the Business Area list administration utility in the web interface to see the ID’s for all areas.

project_id specifies the project_id into which the allowed values will be imported. You can use the Project list administration utility in the web interface to see the ID’s for all projects.

parent_dd_name specifies the data dictionary name of the parent field which has the allowed value relationship with the specified child.

child_dd_name specifies the data dictionary name of the child field which has the allowed value relationship with the specified parent.

The values in both the parent and child allowed value lists must already exist to work with this command.

The optional access_token parameter allows you to use a valid OAuth2 token obtained with the get_token command.  If you provide the access_token parameter, then the user_id and password parameters should not be provided.  This prevents the password being sent in clear text over your network connection.

EXAMPLE

The following HTML file can be used as a simple template for this command:

<html>   

    <body>     

        <form method="post" action="http://www.mycompany.com/evj/ExtraView/ev_api.action?       

            user_id=username&password=password&statevar=import_allowed_values&       

            area_id=0&project_id=0&parent=IT_BUILDING&child=IT_BUILDING_FLOOR"       

            enctype="multipart/form-data">     

        <input type="file" name="file" id="file" size="1" value="" maxlength="256">     

        <input type="submit" value="Upload Attachment(s)" class="menuButton"       

            title="Click to process and upload the attachments you have selected">     

        </form>   

    </body>

</html>