How To get the Last Value stored From Firebase Database?

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

Ok, then we have to sort it on the basis of time?

1 Like

Use the method i munitioned in my post.
How To get the Last Value stored From Firebase Database?

ok, can we do all this by just reversing the list and getting the index 1 and 2?

Yes you can but maybe it’s not ordered.But try it and see if it will work.

1 Like


This Is very lengthy…

Any shorter method?

There is a shorter method if you sorted according to the time only.

1 Like

How to do that?