How do I select the first record which meets a condition
hi, I'm attempting to use a formula to pull the latest record from another table where a condition is met but I get a syntax error - I'm new so I expect this is an easy one but I can't figure it out! Any help would be appreciated
first((select Signals).'Date / Time' where Pair = myPair)
4 replies
-
Try this...
first(select Signals where Pair = myPair).'Date / Time'
-
That was really helpful - thank you! the only problem is it gives me the first record in chronological order when what I'm after is the latest.... I thought the answer might be the below but ninox doesn't seem to like the desc syntax. Any ideas? Thanks again!
first((select Signals where Pair = myPair) order by 'Date / Time' desc).'Date / Time'
-
Sorry, I just focused on the syntax. If you want the latest, you would use
last()
instead offirst()
.last((select Signals where Pair = myPair) order by 'Date / Time').'Date / Time'
As far as I know Ninox does not allow "desc" when using "order by".
-
This was perfect. Thank you!
Content aside
- 5 yrs agoLast active
- 4Replies
- 2013Views