Custom List with External Collection - filtered result - count?

Hi,
didn’t find on this forum my question

i have AirTable as external datsource for my Adalo project, in my project i have a screen with custom list of Guests and input component to search guests by name:

AirTable api have limit of returned records in one request = 100, in that case i write my own php script to get all data what i needs

on External Collection settings i set Endpoint Get All to my php script, and on Custom List filter set additional parametr - search

and it is work fine:

i got all data what i needs


The problem is - count of guests

on Network console i found that Adalo send 2 request when you change input value:

2nd request = reuqest to endpoint Get All with parametr search in filter on List

https:/xxxxxxx.000webhostapp.com/test_airtable.php?token=*******&search=Ctest

returned your search result ( i have 243 records with value = “Ctest” )

1st request = look like request to the same endpoint but without parametrs

https://xxxxxxx.000webhostapp.com/test_airtable.php?token=*******

returned firs 100 rows ( my php script return first 100 rows if parametr search is empty or not set )
than i changed my php script to return all data if parametr search is empty or not set , and count of Geuests = 999 ( all records )

i think that count of Guests = result of 1st request

then i trying to change External Collection setting to add param search = “Ctest” to end point Gett All

and count is 243

in setting i cound’t add this paramert via magic text = input value, or make it dynamicaly changing, only data from Logeed in User

The question is: could you please tell me more about counting of result data or maybe how i can change data for Logged in User when Input vaue is chaged, or how to get count of search result?

and how it will work in build app ?

thank you

Can anyone explane this? thank you )

I feel as though your solution (although interesting) may be over complicating this. You can use the offset parameter to paginate through 100 records.

How pagination will help to found count ?

Way pagination is good idea ? if i have no large data ( like images or video ), just 190kB of text ?

Yes, add a button for the search strart and set the current user’s search parameter to pass it to the endpoint - this works, but very slowly…

and It also solves the problem of asynchronous search queries:
https://forum.adalo.com/t/filtered-custom-list-synchronous-requests-result/7938

I can’t find any apps that start search by button, because it’s probably not convenient

thank you

Count Filter


send request to endpoint GetAll

with
column_filter:W3sidmFsdWUiOiJ0ZXN0IDEyMzQiLCJ0eXBlIjoiY29udGFpbnMiLCJmaWVsZCI6ImZpZWxkcy5zZWFyY2gifV0=

column_filter:[{“value”:“mart”,“type”:“contains”,“field”:“fields.search”}]

but endpoint ( for exampe “pipedream” ) did’t get any params from this

i didn’t have any idea what is column_filter


CustomList Filter

Screen Shot 2021-01-19 at 7.20.15 PM
send request to endpoint GetAll with params:
api_filter:eyJmaWx0ZXJCeUZvcm11bGEiOiJTZWFyY2goJ21hcnQnLCB7c2VhcmNofSkifQ==

api_filter:{“filterByFormula”:“Search(‘mart’, {search})”}

endpoint ( for exampe “pipedream” ) get this params

returned correct data of request


Is there any correct solution to get the Count of items in the dynamicly filtered list ?

PS all External colelctoin AirTable endpoints are seted by defaults

thank you

Sorry to bring it up again

how can you show the counting of search results in a list through an external collection ?

writing a parameter for search and an additional parameter for endpoint GettAll when using the field with the Logged In User is incredibly slow ( in previewer )