[TO <object>
[THROUGH <relation>] <to_body>
END_TO]
[TO_EXCLUSIVE <object_field>
THROUGH <relation_field> <to_body>
END_TO]
The TO clause is optional. Use the TO clause to define the related object types to export. The related object is specified with the <object> value. The <relation> value can be a traditional relation value, such as case2subcase, or it can be a long integer field on the object that is used as a relation, such as the site_objid field on the site_part object.
Use the TO_EXCLUSIVE clause to export objects through an exclusive relation, which uses the object type id <object_field> and the objid <relation_field> as the exclusive relation parameters.
The <to_body>, used for both the TO and TO_EXCLUSIVE clauses, is in the form:
<uniques> <actions> <stop_ifs> <tos>
All object types related to the top level object type can be reached recursively and exported, and references can be pulled and included in the export file. In the example below, the case objects will be exported along with the related subcases. In addition, the activity logs for the cases and subcases will be exported.
EXPORT CASE
WHERE arch_id = 1
ACTIONS = EXPORT,DELETE
TO subcase through case2subcase
ACTIONS = EXPORT,DELETE
TO act_entry THROUGH subcase2act_entry
ACTIONS = EXPORT,DELETE
END_TO
END_TO
TO act_entry THROUGH case_act2act_entry
ACTIONS = EXPORT,DELETE
END_TO
See Also |
Next |