Provided that multiple “patients’ sample sent” can be contained in a single “Return from China”, I would advise setting the “Sample sent” table as a child of (search : ispartof appsheet) the “Return” table.
Keeping things as enumlist can get things done too, but a parent-child relation offers far more flexibility.
From the “Sample sent” table :
You can add that sample to a new “Sample return” by an action. Make a column in the ‘sent’ table that’s a yes/no column (sample marked for return?). An action will mark that column of the concerned ‘sample sent’ record to yes.
You can add a sample to an existing “Sample return”, same way marking that column to yes.
You can add sample sent records to sample return records from within the sample return table, by referencing the sample sent table (which would be set up already if you do the ‘ispartof’) and devise a proper valid-if to filter all those records that doesn’t have the “sample marked for return?” column as yes.
Also, since the sample sent rows that have been assigned a return shipment, will inherently contain the sample return reference, you can make use of isblank() and IN() to do away with the additional column.
- If you follow the above, you don’t need a third table, which unnecessarily complicates things and adds to the sync time.
Given that you are subtracting lists, I might as well would assume you are advanced enough to understand what I said above.