Filter Airtable all data by specified Date and display in ListView

I have some data in Airtable. The data are recorded daily basis. I want kodular blocks to show data filter by date may be in List View. If I select date in Date Picker then all the data of that Date should be showed in ListView.

1 Like

Search on Community first

I’m searching community since a week. But i cant find any solution regarding my query.

This helps you

But that Topic shows about sorting. I want Date Filter. If I Select 15-03-2020 from Date picker. Then the all data which belongs to specified date will show in ListView.

And thanks a lot for replying.

First of all you have to know that working with dates is a little more complicated than working with just text.

I have a table on airtale with dates from 2019 to now.
And for airtable to sort them by date, you need to first tell airtable that you are going to work with dates.
For that you have to set the data type of the column:


(In the example I put the European format, but you can put another one.)

Important Note:
In all the tests I have done I always receive the date listing in ISO format (2020-04-07 for today’s date, for example).


This is very important because the date format of the DatePicker has to be the same as the date format we receive in the date list.

Well, with that in mind, we get the data from every column of Airtable we need.
For this example the format of my Airtable table is:

Now we get the data from each column. You can do it when you initialize the screen or with a button or whatever.


For each column we create a variable (initialized in empty list)

Here are the blocks to get each column:

We have each column in a variable.
Each variable is a list.
Now it’s a question of knowing where in each list the value we want to obtain is.

We need to create a list type variable that saves the position of the data we are looking for.
This value tells to us where the value is in the list:

So we create the variable “indexes” and give the DatePicker the ISO date format. And we make that for each value in the list, add the position in which it is in that list.


Note:
The value of label 1 is not necessary, I put it to see if everything goes well

ResultDate is a local variable that saves the dates in this case and puts them in a ListView. If instead of wanting to put the dates you want to put something else, just change the variable “date” and put another one.

The most important of this is the Foreach and the local variable ResultDate.
Having that you can put it in a ListView using HTML, or make it to show you the results at each date.

Something like this:

It would look something like this:

Or If you can display it like this in the ListView:

You have to use these blocks:

I hope this guide serves everyone who wants to filter data on Airtable.

6 Likes

Something important:
I see you have an entire empty column in your Airtable.


If you try to use that column to get data, you won’t get anything and it won’t work.
Airtable needs every cell to be filled with a value.

You can use zeros (0) or dashes (-) but there has to be some value.

1 Like

You can make this guide also it helps everyone and easy to search

You’re great at this.
Thanks a lot buddy. For such a good explaining. :heart: :heart: :heart:

It’s a good idea. I already posted it in the guide section, in case anyone else needs to do the same. Thank you

2 Likes

Thank you very much @pepocero !!
We really need more people like you on the forum. Today I learned: what, why and how

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.