I'm using historical values of an integer to represent a product type in AF using enumeration sets. The integer represents a product type and is set in the HMI by the operator. Unfortunately, my client changed the representation of the integer and notified me after the fact to account for it in the historian and reporting. For example:
- Previously 1 = Product_A, Now 1 = Product_J
- Previously 2 = Product_B, Now 2 = Product_X
To make the daily reporting work for current values, I've saved the old enumerator values as a different enumerator set and updated the enumeration set so it works for current values, but looking data from before the change will produce incorrect values (Product_J will be returned where Product_A should be). I want to tidy this up so it works properly for all date ranges.
I'm sure there are a few ways of dealing with this, some of them more elegant than others, but I'd like to see if anyone has any experience or recommendations before I go off modifying my reports that reference this data. Data is principally pulled out of the AF via OLEDB Enterprise.