You should try to limit how much data you call and the number of API calls. To update a record, you shouldn’t get all rows, loop through all rows until you find the row you need to update, then update that row.
With the AirTable API you can use things like filterByFormula to query the data in one call to reduce the data you are retrieving.
So in this video I demo the concepts of how to use the AirTable API. I will also share the set up and screen shots of the blocks.
Oooh… I think I just learned that I can use the Firebase API for making a PATCH call to update a particular child in the database. This should be very useful. Thanks, @darren!
I’ve started using Airtable formulas to filter data. I create a view in Airtable with a specific column formula that I want and then add that view as a Data Source in Thunkable. The only (big) problem is that all of the views are named the same thing… the table base name.
But this allows me to sync Airtable with a Data Viewer List (DVL) whereas filtering by formula (below) doesn’t easily allow that.
If we could get these two issues fixed, it would be amazing:
Beyond that, I’m not sure how to add multiple filter requests to an Airtable API call. Can you give an example of what you’re trying to do?
The Airtable API accepts filterbyformula as a QueryParameter field which you can use the same formula used for the view filter. Of course the problem then is to loop through the records and store them in a local table to show them using DVL.
Yeah, just realized it really depends on whether or not you intend to use a DVL. I like my in-table view filtering for DVL support but the API filtering by formula could be used for many purposes.
All I have to do in Thunkable is to change the value in ControlTable which contains a single row. This will allow different records to be displayed from the Students table.
I’d love to know a little but more about how you do this. When you say the tables are “connected” what do you mean? And how does the value in the ControlTable column achieve filtering?
Edit: Okay, I see how to link records from one table to another. How are you populating the student names in the “Students” column in the ControlTable?
When you choose to link your column to another record you choose this option
The next step is somewhat not very clear, you need to link the new column you created with a row in the other table by choosing this
Select all that you want. For me I selected all rows in Students table.
The next step is to create another column which is a formula column.
This is the filter I used IF(ControlTable=0,1,StudentGrade=ControlTable)
Which translates to
IF the row in ControlTable contains 0
THEN show all rows
ELSE
show rows where StudentGrade column matches ControlTable
The last bit of the setup is to set the Grid View which is the default to filter on the formula column
it worked for me.
I have a table that will contain many records in the future. With one condition I can filter, but I am not finding a way to insert the second condition. I need to filter on two fields and then save the data in the local list and then show them in DVL.
@muneer… thanks to you, I was able to remove my three extra Data Viewer Lists and just have a single one that switches between filtered columns. It’s working great!
I have already tried so many ways to do
({Num_Paese} = 48 and {Num_Categoria} = 20)
but it doesn’t work.
Either there is a particular syntax (and I was wondering just that) or it is not possible to insert more than one condition.