reproduce select DAT 'by condition' in build 3715

So at home, I had a nice system built that did a lookup on a table using a select DAT ‘by condition’ in the latest build. Now I am stuck with 3715 on this project, and I discovered that the select DAT did not have this feature in that build. Now I am trying to reproduce it via an expression.
I am attempting to return the value of a cell in the second column when a counter is greater than the value held in the first column, i.e.:
table:
1 1000
30 2000
45 3000
60 4000

if the counter is 34, it would return ‘3000’, if the counter was 49, it would return ‘4000’

I would be very grateful for any push in the right direction.

MD

I can’t think of an elegant expression solution because you sort of need to loop through the rows checking their value, easy to do in a script with a for loop, but not so easy in an expression.

However, I’ve put together a small DAT network that does the trick, maybe that will help. Thank selina for input on this network…

project1.tox (950 Bytes)

ah that’s clever…
Thanks Selina and Ben for the quick solution!
MD