Last three entries in my backend

Hello guys, sometimes i have some difficult in work with lists of objects in Appgyver, i have mapped a list of objects in my backend where the user_id in every object is corresponding to the current id logged in, so far so good.

I have some functions to access this list via formula e.g. last item or first item of my list, but i actually want to access the last 3 entries of this list.

I’ve tried to use “repeat with:” properties or bind the content to a formula getting the last item, but there is no “last but one” or “last X entries” formula/option.

Someone had the same question or insight about this question?

You could use REMOVE_ITEMS_AT to remove everything but the last three items for what you want to repeat, or SELECT by selecting only those items where the index is one of the last three ones (you can get how many items there are via COUNT). REMOVE_ITEMS_AT is probably slightly more performant.

1 Like

Thank you Mevi,

I did the remove_items_at as you said, it worked.