Lookup table behavior

When a lookup table is accessed with a non-existing rowcode it seems to throw an error instead of returning a result, so this condition cannot be detected inside validation expressions.
My proposal would be to return NaN if there is no entry in the table for a given rowcode. This way one could test for this condition with Double.isNaN() and bypass the validation.

An application example would be price ranges for a long list of products where only the more frequent products are included in the lookup table.

You can

  1. Use TABLENAME.Keys.Contains[value] to check if the table contains the corresponding lookup value. This will avoid raising an exception as you described.


  1. Put the rows of missings directly into the lookup table.

Whichever is simpler.

Perfect. I didn’t know you could access the list of keys like this.
This solves it.

Thank you