Description

The DocUpDoc config items are part of config DocExt that define how changes in one document will be reflected in others. Besides the instant documents update the config allows to set the delayed update through server in order to bypass the users' access level which is insufficiently for change the documents but the change need to be performed.

The DocUpDoc config items should type on the tab DocUpDoc of a config DocExt. Use new line for each item.

To the config's items you can address each time when a document is being saved at running of a code.

The source document for a DocUpDoc config item is a document which is now being changed and represented by the DocExt config with the DocUpDoc item. The targets documents are documents which the changes made in the source document are reflected in.

The documents updating by a DocUpDoc config calls the chain reaction. Thus if changes of the source document are reflected in a target document using the DocUpDoc config and if the target document has own DocUpDoc config, the changes in it will be also reflected in its target documents and so on.


Item's Format

The format of a DocUpDoc config item:

D2D[ name ] D4D[ name ] NEW{ condition } DEL[ subtags ] DELAY{ condition }

The format description:

D2D[ name ] - the name of a config DocToDoc. If a change described by an item of the DocToDoc config occurs in the source document, the change will be reflected in the target documents;

D4D[ name ] - the full name of a DocForDoc config's item to get the target documents for their update. You can type here the extended form of the documents getting: D4D[ SRC{ condition } name TRG{ condition } ] - read more about the format in the end of the help topic - DocExt\Doc config;

NEW or NEW{ condition } - means that if a new source document is being saved for the first time, the data from it will be added into the target documents. If the tag is typed with a condition, it will be checked on each target document;

DEL[ subtags ] - the part of an config item defines the action on the target documents when the source document is being deleted. The tag contains the subtags inside:

FAIL or FAIL{ condition } - means the deletion fail if the result of the condition's check on a target document of any level in the updates chain is @True (1). Type the tag without a condition in order that just presence of target documents causes the deletion fail;

STOP or STOP{ condition } - works like FAIL, but is checked the target documents only of the first level in the updates chain;

ERASE or ERASE{ condition } - defines when values of the source document will be erased from the target documents.

ALSO or ALSO{ condition } - defines when the target documents will be also deleted together with the source document.

If you want to perform a subtag action unconditionally, just type the tag without the brackets { }. The subtags at source document deletion will be applied in the same sequence as they is listed in the description of the tag DEL until the first check condition result of a subtag @True (1).

DELAY or DELAY{ condition } - defines when the target documents will be updated through server. It can be useful in case the user who change the source document has not access to perform the updating by the config item DocUpDoc in target documents. Type only the tag DELAY without the brackets { } to perform the delayed updating unconditionally.


Topic links:

DocToDoc config

DocExt\DocForDoc config

See also:

DocExt config