Recup Last value from firebase

Hello everyone,
How can i recup items value from last ID?
In the exemple Just USD from just the date : 4 8 2020

Exp;

       + 1 8 2020
       + 2 8 2020
       + 3 8 2020
        **- 4 8 2020**
                  EUR:"\"0.85\""
                  **USD:"\"1.18\""**

Thank you.

Set project bucket to:

<YOURFIRSTPROJECTBUCKET>/4 8 2020/USD

But the last date can be other than 4 8 2020

Two options:

Call back all the data by setting an empty project bucket, then use dictionaries or lists to get your value
or
Call back the tags, get the last item in the taglist, then do as above

How about cheating by adding an extra branch to your data tree under tag 'LASTID' always updated with the new id value (4 8 20) ?

By the way, 4 8 20 is an unfortunate date format if you are looking to sort chronologically.
A yyyymmdd format has the advantage of alphabetically and numerically being sorted chronologically. You can always reformat yyyymmdd for display purposes to taste.

The latest yyyymmdd would appear in slot 1 of a descending order list (limit=1) if your database allows that, skipping a lot of work for the app.

1 Like

Thank you for your replay
As i said, i'm new with app inventor and without any knowledge, and i'm trying to solve this problem which is to retrieve the data relating to the last date. confirmed by examples if possible

And I translate through google translate, so excuse me if you don't understand me.

Here is my first simple attempt, I ask you how to recover the data of USD EUR etc according to the date of the day (I dropped the idea of ​​the last date)
ToFirebase

Something like this:

image

Like this

Looks good, needs the blocks to go with it.

Exactly and its my problem :thinking:

What have you tried, did you follow my example blocks ?

Yes but it s different , in my exemple getting data is from two spinners in the same time

You will get the dates in to the spinner either from a local list you stored when saving data, or from the taglist returned.

Your spinner list for currencies can probably be hand coded as there aren't that many

You use these selections and set them to variables, which then replace the values (date/currency) in the blocks, and then the request to the firebase server is made, returning your required output.

A post was split to a new topic: How Do I Get Firebase Data into Listview?