.. ================================================== .. SyncByRule - Quick Start Guide .. ================================================== .. _`syncByRule`: SyncByRule ========== SyncByRule enables export and import of relational database records via JSON. Records can be copied between browsers (clipboard) or deployed between databases. Quick Start ----------- Export Button ^^^^^^^^^^^^^ Create an export button in a QFQ Report: .. code-block:: sql { sql = SELECT CONCAT('export|t:Export||{"dataType":"PersonData","element":[{ "table":"Person", "data":[{"id":', p.id, '}], "identifier":"email" }]}') AS _link FROM Person AS p WHERE p.id = {{id:S}} } Import Button ^^^^^^^^^^^^^ Create an import button: .. code-block:: sql { sql = SELECT 'import|t:Import||{"dataType":"PersonData"}' AS _link } The ``dataType`` must match between export and import to prevent accidental wrong imports. .. _`syncByRule-syntax`: Syntax ------ Export ^^^^^^ :: export|t: