When importing a record, you can define behavior based on whether the record already exists. This allows you to ensure that a related record is only imported if it does not yet exist. If it already exists, it is possible that a user has modified it, and therefore you may not want to import it again and overwrite its values.
The mode can be set individually for each record and also for each operation (create/update).
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana update="ignore">
<id>123</id>
...
</faktura-vydana>
</winstrom>
Operation | Mode | Description |
Create |
| If the record does not exist, ignore the request to create it. |
|
| If the record does not exist, fail. |
|
| If the record does not exist, create it normally. Default value. |
Update |
| If the record already exists, ignore the request to update it. |
|
| If the record already exists, fail. |
|
| If the record already exists, update it normally. Default value. |
A mechanism similar to row skipping can also be used for relations. Example:
<?xml version="1.0"?>
<winstrom version="1.0">
<faktura-vydana>
<firma if-not-found="null">code:FIRMA</firma>
...
</faktura-vydana>
</winstrom>
In this case, if a company with the code FIRMA is not found, the relation will be set to null instead (i.e., empty).
Operation | Description |
| If the record does not exist, do not set the relation. |
| If the record referenced by the code does not currently exist but existed in the past, the relation is set to the most recently invalidated record. The date considered is the document date, event date, etc. This is useful, for example, when importing historical documents with references to account numbers that are no longer valid. |
| If the record referenced by the code does not exist, it will be created automatically. For records of enumeration type, the code / name properties are populated based on the reference value (e.g., |
