Skip to main content

Field "source"

What is the purpose of the "source" field in a record?

Written by Petr Pech

The source field is used to mark the source of a record — typically the system or batch the data came from. Flexi doesn't process it in any way, so you decide on its content yourself.


Usage

It can be filled in both when creating and updating a record, on the document header as well as on the item:

<winstrom version="1.0">
<faktura-vydana>
<typDokl>code:FAKTURA</typDokl>
<source>EXTERNI_APLIKACE_C.2</source>
<polozkyDokladu>
<faktura-vydana-polozka>
<kod>KOD1</kod>
<source>EXTERNI_APLIKACE_C.2</source>
</faktura-vydana-polozka>
</polozkyDokladu>
</faktura-vydana>
</winstrom>

⚠️ The length is limited to 50 characters. A longer value will result in a Pole 'Zdroj' nesmí být delší než 50 znaků error.


What it's useful for

Records can be filtered retrospectively by source, so it's useful, for example, for marking an import batch or distinguishing which of several connected systems created the record:

GET /c/{firma}/faktura-vydana/(source='EXTERNI_APLIKACE_C.2').xml

💡 If you need to link a record to its counterpart in another system, the external identifier is better suited for that — it's unique, allows you to address the record directly, and has no 50-character limit. See Record identifiers.


Related

Did this answer your question?