Filter Google sheet Data and show the result in a DVL

Just wanted to share this trick to filter data in a DVL

For Example, if I have a sheet with numbers and names then I need to add another column to be the condition to filter by
image

In this example I have a number column and a name column and the 3rd is the search column.

In a separate sheet have the same two column headings
image

In the row immediately below the heading of the first column, enter this function
=filter(Sheet1!A2:B7,Sheet1!A2:A7=Sheet1!C2)
image

Now in Thunkable, add a DVL and bind it to the second sheet. Have a button to update the search column in the first sheet. When the value of this cell is updated the second sheet will reflect the filtered data.
You will need to refresh the DVL to get the filtered results
image

Hope you find it useful.

4 Likes

This is equivalent a vLookup, right? In this use case, anyhow?

1 Like

You could say a code-less vLookup :face_with_hand_over_mouth:

1 Like

Nice use case and example here! How well does this work if 100 people want to complete different filtered lists at the same time.

ie Is this a scalable solution?

1 Like

If you are asking about multi-user operation, Then you will not be able to establish such a trick because Thunkable, in one way, does not allow dynamic change of Data Source to be able to give each user a session. In the other hand, Google sheet is a collaborative app which means it is built in a way that when you change a cell others in viewing the same sheet get a reflection of the change.

I created a Google Apps Script to give me a snapshot of the sheet as a JSON set to go around it. But that was a pure HTML/JavaScript/AppsScript project. I did not try it with Thunkable.

1 Like

Makes sense! And good points there!

A scaleable solution requires the use of filtering on the backend or in the client itself.

I find FB perfect for this but not easy for all to use. I’d love to set up some examples sometime soon.

Airtable has good filtering via the api also as does xano or backendless.

I’d love to see a filter by block for the firebase calls one day.

3 Likes

I made a similar trick for Airtable to perform filtering in the table side.

See this Airtable view that shows students in specific grade

The selected grade is stored in a separate table
image

If I change it to another number, let’s say 5
image

The view of the students table becomes:

Hope that help members in the community.

1 Like