Hi Dojo,
we will add the same column in multiple tables and do not want to write the same row trigger function for every table. Is it possible to get the id of the table of the row which was changed? Currently I only have one trigger function for a specific table and using a hardcoded table id, but if I want to use it for multiple tables the trigger function needs to be more generic. Of course I can check if any table has the rowKey, but maybe there is a better way or another way is best practice like writing a trigger function per table.
Thanks,
David
Hi David,
You can implement a more generic solution by structuring your tables with specific offsets, allowing you to identify the corresponding table based on the trigger parameter.
For example:
Table 1: PID 1000
Table 2: PID 1500
Table 3: PID 2000
(...)
If the QA trigger falls between 1001 and 1499, it belongs to Table 1000. Otherwise, it would belong to Table 1500, and so on.
This approach enables you to simplify the trigger logic while keeping it flexible for multiple tables.
Kind regards