Skip to main content
Solved

History enabled table with lookup field


Hello,

I have a history enabled table with a lookup field. The lookup field is marked as type I (update record). However, the record is only updated with the new values in the table from which the lookup field is retrieved, if the record is available in the raw variant of the history table. If the record has been updated in the mean time, the lookup field is never triggered to be updated.

Is there a way to have the lookup fields be updated in a history enable table without the record being present in the raw table?

I have currently created a work around by not truncating the raw table, but this causes an unnecessary increase in the size of the raw table and produces many primary key violation errors.

Looking forward to your answer!

Best answer by tld

Hi Agnes,

If your table is not huge, you could create your history table as a new table (Disable history and then Clone Table structure from your current table) - lets call this the import table. Then use “Table Insert” to insert all records from the import table to the history table and enable history on this table.

Does it make sense?

 

View original
Did this topic help you find an answer to your question?

2 replies

tld
Contributor
Forum|alt.badge.img+1
  • Contributor
  • 13 replies
  • Answer
  • July 20, 2023

Hi Agnes,

If your table is not huge, you could create your history table as a new table (Disable history and then Clone Table structure from your current table) - lets call this the import table. Then use “Table Insert” to insert all records from the import table to the history table and enable history on this table.

Does it make sense?

 


  • Author
  • Contributor
  • 5 replies
  • July 20, 2023

Hi Thomas,

I guess it would work if I do it the other way around and create a clone of the history enabled table. The lookup fields are related to the specific records in the history enabled table. It would still mean a duplication of the data, but would avoid the violations.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings