How To get the Last Value stored From Firebase Database?

This is my database and I want To get the last of the values in this pic it is ending with 44PM.

I have tried a lot of time but it is giving me different values bu not the last one.

My Blocks:

If you want to get the last value then in index use length of list.
As length of list is the index of last value.

2 Likes

See here

1 Like

Just get the tag list from firebase db. And when you get it select list item from the tag list which the index of it is length of the tag list.

Thanks,
However, I know That value variable is from Taglist.
image

The kodular’s own reverse list component/block doesn’t work @dora_paz ?

1 Like

Do you get different values? May be you can debug your blocks and see what is the values.May be firebase returns the list unordered.I heared about something like that before in the community but it was about airtable.

1 Like

When you add new tags in firebase it is sorted out in ascending order. (Only in firebase database)

But when you call tag list then it is not sorted out in ascending order.

1 Like

I need the last and the second last entry.


With List tools also its not working :disappointed_relieved:

Does your tag names have a meaning? if not.You can set them using ascending numbers for example.And when you get the list sort it in a descending order using list utils.And select list item 1.

1 Like

No I saw that in console it arranges the entries in alphabetical order so I added A in front of them to make it all equal.

Yeah, Format is A+AuthUID+time

1 Like

I tried but it is giving other value

1 Like

So we can order them by time?
First suppurate them by a separator @ for example.
Don’t use “/” or £ or $ etc…

1 Like

Good Idea. When the user add the program will trigger Auid@time, right?

1 Like

Like This:
image

1 Like

Now how to suppurate it?

Right.Then you will split the tag at the @ seprator and select from the output list list item 2
Then use this method to sort with date and time.( its quite leangthy )

Using split text at and set at to @ you will get a list as an output.Select from the list item number 2

text_split
this one ??

1 Like

Yes this one