|| At the latest #debt^deadline || #debt^amount-to-be-payed ||
Both datafields are repeating lists, the one as a date and the other as a currency.
Let’s say we add 5 lines.
In another clause, I would like to use the data from the last line that has been added to the above repeating list, only line 5.
For example: This will happen after the last payment ( #debt^amount-to-be-payed in line 5) which needs to be executed the latest on #debt^deadline in line 5.
This will happen after the last payment (@get(#debt^amount-to-be-payed, @count(#debt^amount-to-be-payed))) which needs to be executed the latest on @get(#debt^deadline, @count(#debt^deadline)).
So what you are actually doing here with @get , is to grab a single value from the listof values stored in the datafield. For example, @get(#debt^amount-to-be-payed, 2) would grab the second value. However, you always want the very last value, so instead of hard-coding a number such as two, you use another function @count that calculates the amount of items currently stored in the list.