How I can use OFFSET RECORD AIRTABLE?

Hi guys!!

I am trying to know if it is possible to use OFFSET with Airtable API. What I need is to filter and sort the data from Airtable

AIRTABLE API ENCODER does not show nothing about offset, only:

Searching and searching on the web, I see that the offset format is like this:

"offset": "itrMNt92dXYGgauIO/rec0Hpk7Jp8Mu4khr"

When I get data from airtable, for example With pageSize = 5 I get this:

And at the end, I can get OFFSET:
itrMNt92dXYGgauIO/rec0Hpk7Jp8Mu4khr

after the slash, is record ID from last record downloaded, and MY QUESTION is: what is after the slash???

How I can use offset with AIRTABLE API??

Now works with 5 page size to do examples, but I don’t know how to get next 5 records.

my blocks…

Thanx

I know the KevinKunAirtable Extension from @Kevinkun, (works great) but it only sort by 1 column and I need more than 1.

You can use airtable rest API method to filer anything from airtable also you can use maxRecords option to get values

1 Like

Thanks for your answer, but what I don’t know how to do is download the following 5 records (for example) using API Method. That is, set offset to 5 using API method.

Thank you.

if you have multiple column and want to get only selected five column, then use this formular

https://api.airtable.com/v0/BASEID/TABLENAME?api_key=APIKEY&fields[]=YOURFIELDNAME1&fields[]=YOURFIELDNAME2

Replace all the caps with your values

if you want only certain amount of records then use &maxRecords=REQUIREDNUMBER at the end of the formula

I can’t explain it properly. When I download the tables from Airtable, I can only download 100 rows. (pagesize=100), and what I need is to know how I download the next 100 rows.

Thanks for your time!!

Why you use 100 only there , use the full length else use a clock component. For every tick set the app to download the total rows one part by part

Using Airtable API method, only is possible to download 100 rows each call. What I need to know, is how I can to set OFFSET to the next 100 rows

This is to minimize APP delay when the APP loading the items for sale from Airtable

Now i understand you… nd you have to use loop using procedure .
When web got text first try to get the key value of offset, if it shows value then print the result in an variable again call the web url just by adding the above said keyvalue… so it will continue untill it gets keyvalue

Edit

See how I retrieved my 150 amount of data in two steps using offset method
ezgif.com-gif-maker

Blocks Used


image
image

image

Here Button click can be used in screen initialize

Pls test it, it worked

1 Like

do you want to sponsor this function by USD10?

I appreciate it, I’ll try this first, I almost got it:sweat_smile:

Thanx!!

1 Like

By this way you can use filter or sort or get all data from airtable using Offset function (100 by 100) but remember you should use add items to the list for every colu… then only you will get proper result. If your row values exceeds more than 500 then you use/start any notifier when the first web url getting triggered.

When web got text i have used a one if then condition where you must add else condition there you dismiss block of notifier . Since I am getting only 150 items before the notifier getting triggered app will show the data’s so I skipped it

In this formula i have used sorting of every field by ascending method

1 Like

Hello!

I really appreciate your help @Still-learning !!

Sorry for not having answered before with my experience with your blocks. It has been impossible for me to do it now. But when I do, I’ll post it. I will use in the next update of my app.

Thank you!!

In such case you can mail me your demo app to fix such an issue.

Create temporary new project, add data’s, add the blocks that you have tried and send it here or in pm

1 Like

I appreciate it, but it’s important for me to learn how to do it.
Thanks for your help.

Check the logic…

On button click web url calls the api first. In the url end i have add & offset= it won’t affect… when web url got text, first the obtained response content were parse the json and add the items into required global variable and checks whether the obtained json contain the key value of offset or not. If it there then again web url called and at the end the key value of offset is added so that next 100 items were download. This loop continued till the value of the key offset is empty string…

That’s all the logic man

1 Like

Yes, this is what I needed to know!!

I’m stealing hours a day to do it :sweat:. Thanks again!

1 Like

Actually the obtained result will have the offset key value only if the result is more than 100 items else it will not have

So the loop(calling the web url with offset key) will run only if the offset key value is not null else loop will break. So if you set any spinning block to run then set it to dismiss only in the else condition of the logic added into web got text. That’s all you need to do

1 Like

HI!!! as you said, your method works perfectly!!! :smiley: It’s so easy!!! (when help is received :laughing:).

Thank you very much!!

In the video you can see how i load list 3 by 3 , but I can select the number of records to download that is whishes.

1 Like

Yes it is your choice. You can retrieve number of records less than 100 at a time also you can get by sorting method, alphabetically asc or dec order too using api method .

1 Like