Extending Ens.Util.LookupTable

Primary tabs

Answers

While not truly extending Ens.Util.LookupTable, we have numerous cases where we have to handle multiple values against a single key. 

Our solution was to identify a special character we would use as a delimiter of values (say @ for instance) and store them as such: value1@value2

We then have a custom CoS function that we can use to perform the normal lookup functions that parses the values and returns them as an array object that we can then use to pull out the value we need.

If you are simply after a pair of values, then the CoS is not even needed as you could use the built-in Piece function to rip apart the values using the delimiter.

If you really need a double key, use a persistence class instead.

You can define your fields and the key you want. You only need one instance of the object and find using the index.

The Looup table  was designed to be used as a dictionary, do not try to use an object for another purpose.

 

Best regards