Guide: Filter Airtable data by a specific date and display it in a ListView

Note: This is a response I gave in a post. I decided to put it in the guide section to help someone else who needs to filter data in Airtable.

As the title says, the idea is to be able to obtain data corresponding to a certain specific date in Airtable.

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.

10 Likes

@pepocero In this if I only want to show that number which is written in text box than what to change in the blocks to only show result of text box
Please help me :pray:

@pepocero Please help me I really appreciate your intelligence

I can’t help you because you don’t explain well what you want. You don’t show anything you’ve done either. All you’re saying is that you have a textbox and you want to show the text in that textbox.
Which would look something like this:
image

It has nothing to do with airtable.
What you’re saying is a basic Kodular thing. I think you should follow some tutorials about App inventor and Kodular to know how it works.

Dear @pepocero What I want is that see:-
I have many rows in Air table and Out of many rows some rows contain their 1st column same. like example :-
ABC 123 asd ( Any row in whole data)
and
XYZ 890 pqr (Any Row)
and
ABC 567 pqr (Any Row)

Out of these data when I type ABC in the text box then I want to get the data which contain ABC i.e. ABC 123 asd and ABC 567 pqr as a result.
I dont want any other result except these.This is what I want So kindly please help me in solving this.
Thanks in advance :blush:

@Saksham_Goyal We continue in the other post, this talking in two posts doesn’t work hehe

Can we innovate the table directly in the application? If you can, I hope you can teach me, my project is completed only by this function

I don’t really understand what you want to do.
To work with the data you must first download it. You can’t do it directly in Airtable

I mean, when we use airtable, the table data limit is only 1200, right? Then you can create new innovations such as table 2 and table 3 indefinitely

I mean, can we innovate this table directly in the application?11-1

The logic is the same. You can use it in the tables you need. You can add one component for each table. And you just have to change the table name

But I can’t think of what to do. Can you make an exception for me to exercise once? please

Must the required table name be changed in advance by using components? Can’t use innovative methods?

One component for every table

So I have to change it every time the data reaches 1200 records and then repack it? Is there a way to modify the name of this form directly in the app? I mean it can be run on the phone without going here

Well yes… that’s the problem with using the free services hehe

You can do something like this
image
But I think the limit on Airtable is not 1200 per table. It’s 1200 per base.

1 Like

I used your fantastic tutorial and showed filtered data in list view.

Now i wish to show this filtered data in dynamic card view.

How to set up blocks.

I have created a new post please help me.

Dear @pepocero I use your tutorial for filter by date and it work great
I try to do the same blocks but this time i want to filter data by text from a list picker but list view return empty without any error messages
so i am asking if i have to change some thing in the blocks
i try to get each column separately to the list view and it work that mean blocks for grabbing data is good the problem in filtering rule blocks
block1



this is the table i use

1 Like

@waellotfy77 You can do it with something like this:

Here’s the aia file
SearchAirtableTest.aia (13.8 KB)

In the screen 3!!!

Edit:

The spinner uses the prompt

1 Like

Thank you @pepocero your AIA file is great and covering many needs
I used blocks in screen 1 but i modify my AIA by adding a list picker for whatever column/columns i want to filter the data with and set textbox text to join the selection of all list pickers that create a key
i add also a column in my airtable to make a similar key in the data then i use this key to show data in list view



also it is preferable to use exactly match length and content method to filter data