Here is my situation:
Table A - Employees
All employee data, to include the unique employeeNum field, is deleted from the table each night and 'fresh' data is added back in via API. So for example, the employee row for employeeNum = 13688 (John Smith) would be deleted and then a new row is added with employeeNum = 13688 (John Smith).
Table B - Assignments
This table has a many to one relationship with employees (an employee can have many assignments). The assignments table is not deleted or purged like the employee data. The relationship is between assignmentId and employeeNum.
I am looking for guidance on how to establish the relationship between Employees and Assignments tables so that when the Employees data is deleted, and then added back in, the relationship between Assignments and Employees will be maintained.
Thanks.
Hi @mike_at_SE
sorry for the late reply. In my opinion it would be better to focus on the original problem and to update existing items. I guess your employees have an unique employee id in your system. You could use a for each loop to iterate through all the elements and search for existing elements in the table. You could update these and if no element is found, you could create a new one. Depending on the number of employees, this may take a little longer, but if the workflow only runs once a day, it might still be possible.
We are getting the Employee data via API. I was having problems being able to map through the existing rows to identify updated data in the source Employee data. So my solution was to just import the entire table each night.
Hi @mike_at_SE
first it would be helpful to understand, why the table content is deleted every day. May there be another solution so you could keep the employees with their assignments?
Best regards
Jeanine
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
ankit_singhal
11
Super User 2025 Season 1