How to sort out values from the list by doing a comparison to each value on the list?

Hello guys,

I am trying to get values from an on create list e.g. I have a list of this numbers 234,45,856,879, and 255 added to a list as the time fires and I would like to get 45 or values less than 255 when the values are added to the list and list those wanted values on a different list? Any clue. @CBVG


List of values adding items on a list as the timer fires and I want to be sorting out the values and list them on a different list view when all values are added to the list?

Raw Data

Not sure where your raw data comes from, but for the sake of this example I created 30 pieces of random data with this loop:

Filtered Data

This is where the second list comes into use. We loop through all of the rawData and if it’s lower than 50 it gets appended to the filteredData list like so:


Sorted Data

There’s also a sort block that allows for ascending or descending sorting, so a third list is created to store the sortedData and use like so:

1 Like

Thanks for the quick response and the logic on how to go about it, it worked.

1 Like

Another question, how can I separate indexes from the list e.g as you created a list of rawdata 30 times. If you just want the list values in index 1,2,3,4 and 5 then display them and filter them out in Thunkable Classic? Thanks.

These blocks will get the first 5 values from the list of rawData and store them in the filteredData list.

The logic is the same for either platform. As a side note, please post any questions about Thunkable Classic in #classicdiscuss


I apologize for the wrong tag, thanks so much for the help it worked. I have another question,

1-How can i sort out the highest value from the listed raw data, when the list is created?
2-How can i test for each number in a listed rawdata e.g if the values are being added and the values added are constant it does not sort out the values, if they is any change i want the program to list the values that are changing in a list?

Second Question Reference Example

As given a list of values above, the program will check were the values have stopped being constant it can be any value in the list and those values were a change happened will be sorted out, example to the reference list above 56 and 59 will be sorted out and also the constant values…?


Check out all the Maths and list components everything you asked for is possible and is easy to do !

some blocks do more than they show, so try all the functions that each math blocks and list blocks do!

1 Like

Thank you, I will test all the Maths and List blocks and see what I can come up with.