Bind last record in table

Evening all,
Hope this makes sense.
I have a table that filters the last three records, which is recording current weight, date etc.
I want in the navbar to show a fighters current weight, fighting weight and difference ( above or below)
Now i can do this in a table, but was wondering if you can bind this to an area with something like:

{{getweight.data.query4[0].weight_kg }} this is obviously showing the first record and i want the last.

Ideally, i want to be able to create profiles showing some data from tables.
Attached image of the dashboard, you can see the table with the data I want, but not in a table format, ideally like this under the menu.

Hope that makes sense.

Andrew


Think I may have gotten it with:

getweight.data.query4[0].weightkg{{.last(1)

1 Like

another alternative:
{{getweight.data.query4[getweight.data.query4.count].weight_kg}}

None of the above working, seems to be pulling the first record and no the last or current…

first count is a function so it should be called with () and it will return the number of records. As the index is zero based you have to subtract one, so the final will be:

{{getweight.data.query4[getweight.data.query4.count()-1].weight_kg}}
2 Likes

Thank you George !!!