Fast record find

Ciao!

I have a (Google) table with 1000 records and more. The record is composed by some fields:

  • IDcustomer;
  • MonthOfPayment;
  • AmountPayed
  • DateOfPayment
  • (etc…)

In my page I have inputted the IDcustomer code and the MonthOfPayment.
Please, what is the fastest way to check if the IDCustomer-MonthOfPayment I have on my page is present in the table?

Grazie!!

Ciao :wave:
Show also the code you 're using now . Which is the worst time you got ?

Ciao!!
This is what I do by now:

As you can see, I scan the table from the first record till the end or till I found what I search for. My question is: can I create an index of that table where I can chain to and have immediately the answer for my query?

The best performance should be less than 1 sec.

Grazie!

Ciao caro ,
Yesterday I tested my app with apk and it was very slow :pensive: web preview and apk have the same time .
Probably you can delete some variables in your code but I think the big problem is the query form sheet.
For fast search I think you have to use 2 data base .
1 on line , with sheet, so you can use it from all the device and 1 local to read data faster.
When app starts you retrieve all data and save them in a local dB and use it as you are doing now with sheet .
Every time you make changes you have to update sheet too.
:wave:t2::wave:t2:

1 Like

Ciao amico!

Mamma mia! what a terrible scenario!!!

Let me understand: using remote DB is a way to slow user experience?? For my app is not possible to follow your kind suggestion: I could have multiple users using and modifying siultanely the same tables…

Maybe is the Google sheets slow? I should have to use other platforms?

Grazie!!!

1 Like

Use algolia for your searches.

2 Likes

Set two lists (or more if needed) to the columns you want to search in when the screen opens. Now all your data is on the phone and you won’t have iterate through a table.

Performance Time: Instant

Edit: That index variable value can also be used as a row id if you need to write data back to your table or get a row object.

2 Likes

As @tthompson41231 wrote you can retrieve the 3 list ad save them in local , then start with for each. In this way you have only one call to dB and not multiple calls from for each. You can try .
Probably with a lot of users retrieve all the data is not a good solution but a part of them could be a good way.

1 Like

All your suggestions were welcome, and your examples let me know more about Thunkable.
I’ll try do do my best to resolve with your inputs, but I have to chek if work on tables in local that could be have edited by other user is dangerous…
Grazie!

1 Like

I hope to add a screenshot as soon as possible, follow the example of tthompson41231 but retrieve data not under open screen but at the beginning of the search code.

  1. retrieve ID , ID cliente , mese and save it in variable
  2. start search code

In this way you make only 3 instant call to sheet and work in local with search code , this is faster than call sheet for each item in list .

:wave:t2:

1 Like

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