Selecting
Hi
I have a table with "date" and a "Type"
Ind a function field i want to show the last date with type 2
last(tablename.date) where tablename.type=2
I can get the last date with last(tablename.date) but i want the corret type...
Hope to get some help
-Henrik
2 replies
-
Hi Henrik -
Try changing the code to:
last(tablename[type=2].date)
You have to put the search parameter next to the table you are searching, not at the end. This will only work if 'tablename' is the name of a reference field. If there is no link between the tables then you have to use the select statement. So it would change to:
last((select tablename)[type=2].date)
The brackets [ ] are another way of doing where but has the added power of filtering search results. It took me a bit to switch my thinking over to using brackets but it was worth it.
Good luck and let us know if this is helps.
-
tnanks, It worked perfect !!
Content aside
- 3 yrs agoLast active
- 2Replies
- 116Views