Sometimes we may need to move or distribute to other spaces the documents that enter a specific space, for example, when it is necessary to assign them to other users or, simply, to classify or reorganize the documents.
We can make these space movements using the Change document operation available in the operations Marketplace.
to serie
To indicate to which space the document should be moved, we have two options:
- Indicate a specific space. We can do this by editing the operation parameters and selecting in the Space field (with serie key) the space to which we want it to be moved.
- make the movement to a space depend on the value of a field. We will use this option when there are multiple spaces to which a document may be moved.
Make the movement to a space depend on the value of a field
For example, if our company has different branches and we want it, depending on the value of a Branch field, to be moved to the corresponding branch space, we will use this option. To configure this option we need a dictionary-type field. In this dictionary we will put the spaces to which the document can be moved.
In Value we will have the internal keys with which we identify the branches and in Label, the names of the branches will be those that appear in the dropdown. Once the dictionary is in this space. We will only have to edit the operation parameters and select in the Dictionary field (with metadata_type_related_dictionary key), the dictionary we want it to depend on.
Once this is done, the operation will depend on this selected field. Important: the operation prioritizes the space selection, if there is a space selected in the operation parameters it will be moved to that space.
How can the operation be used?
The operation can be used from lifecycle states or after document validation. It can also be used in other parts of processing in the case where the space to which the document should be moved is always the same.
Other parameters
In addition, the operation has some extra features, which can be enabled by activating the appropriate operation parameters:
-
change_related: if enabled, all related documents will also be moved -
reset_state: if enabled, the active lifecycle state will be reset -
run_postload_on_destination: if enabled, the postload operations of the space to which it has been moved will be executed.