Using the data processing function, you can perform various operations across a column. Compare and link is an operation that allows you to link records in two different tables when a column value in both tables is identical.
Putting on the operation
- Open any table and click the three dots in the view options.
- Click Data Processing, and then click Add Data Processing Operation.
- Give the operation a name and select Compare and Link.
- Define two tables you want to compare and link, and in which columns the values must match for SeaTable to link the records.
- Click Save to save the action and execute it later, or Execute to execute the action directly.
Use case
A concrete use case for this data processing operation could occur, for example, if you work in the accounting department of a company and record in two tables, on the one hand, the invoices and, on the other hand, the transactions performed.
Here you want a link to be created between these tables when the invoice amount in one table matches the remittance amount in the other table. Using the linking you can easily link the related records so that the invoices are assigned to the remittances and the remittances are assigned to the invoices.
For the implementation, you first need two tables: a table in which the invoice numbers(Invoice Nr) and amounts are recorded, and a table with the transaction numbers(Transaction Nr) and amounts(Amount).
To create the data processing operation, follow the steps described above. For the specific use case, select the Transactions and Invoices tables and the Amount columnswith the respective amounts that must match in order to link the records.
If executed successfully, the Transactions and Invoices tables are checked for matches in the defined Amount columns. If the amounts in these columns match, a link is created between the two tables.
In this case, a link to the corresponding transaction from the Transactions table is added to one side of the corresponding invoice in the Invoices table.
On the other hand, a link to the corresponding invoice from the Invoices table is added to the corresponding transaction in the Transactions table at the same time.