Lookup

It would be nice if the lookup function returned the NoMatchValue when it encounters a NULL value in a dataset.

I’m using a lookup function like - lookup({Root Container.tanks},{Root Container.Tank.ID},-1.0,0,6) to bind to a dynamic property and had hoped it would return -1.0 when it encountered a NULL in the dataset, but it returns 0.00 instead.

Yeah, we actually noticed that when we were implementing your other request for the lookup function.

What we ended up doing is treating NULL as a valid match - if you find null, you’ll get null returned from lookup (after all, some might want to know that the value was present, but null, rather than not found)

You can protect against this like follows (in FactoryPMI 2.2+):

coalesce( lookup( {Root Container.tanks}, {Root Container.Tank.ID}, -1.0,0,6), -1 )

Hope this helps