What is the fastest way to sync a table to ValueList items?
I have a large table with a ValueList, I want to sync another table with this value list.
Case, if a ValueList item does not exist in the other table, add it.
I am interested in the most efficient script steps.
Why would you add a new item to the transaction table without first adding them to the "side" table?
A relationship linking the two tables would work for this. You can perform a find for the records that do not have a matching record in the side table and then import the found set into the side table. A "unique values" validation on the side table can keep duplicates from being produced by the import.
Go To Layout ["MainTable" ; (MainTable) ]
Enter Find Mode [pause: off]
Set Field [ SideTable::ValueField ; "*" ]
Omit RecordsSet Error Capture [on]
Perform Find [ ]
If [ Get ( FoundCount ) > 0 //there are records in Main not in Side ]
Import Records
End If