I am creating a jet report for use instead of Aged Debtors report in NAV.
I need to retrieve the most up to date exchange rate on the system however my formula always returns the first record.
My formula: =NL("Last","Currency Exchange Rate","Starting Date","Currency Code",B5)
B5="EUR"
So I think this should return the newest exchange rate for Euro's, but always returns the first that was entered on the system.
Date
Votes
1 comment
-
Jet Reports Historic Posts You need to let NAV know what criteria to use to determine what "Last" means to you.
This is accomplished by specifying a sort order (you have to sort in order to know which record is "last").
So, if we wanted the last (by date) "Exchange Rate Amount" from the "Currency Exchange Rate" table:
=NL("Last","Currency Exchange Rate","Exchange Rate Amount","+Starting Date","*","Currency Code",B5)
By specifying the sort order on the "Starting Date" field, NAV knows how to determine "Last".
We could also accomplish the same thing using NL("First") if we sorted in the opposite direction (using "-" instead of "+").
-HP
Please sign in to leave a comment.