New Function to play around with "List"

Appsheet introduce new features, OCR and other useful functions, they returns the values to the data fields as LIST types like {50, 80, 150, 300}
However, the important feature we are missing which have been discussed with the community.
In short, we are missing feature to “reconstruct the list with given conditions”
This is something like controlling “array” with forEach syntax in programming languages with “where” conditions.

Just borrowing name of JS function of forEach to make it clear, so the new expression is something like

ForEach([ListTypeDataField], “EachItem” >= 100) to return new list.

For the condition part, we are able to use existing appsheet expression off course, like

ForEach([ListTypeDataField], Contains([ListTypeDataField],“ABC”))

Somethin like intuitive expression desired.

Thank you for consideration.


You’re right, there is no way to accomplish what you’re wanting. For example:

If I have the following list: list(1.5, 0.2, 5.3, 1.9) - and I only want values greater than 1… there’s no way to do that.

I could use list math (the ability to +/- one list from another [ LIST(1,2,3,4) - LIST(4) = LIST(1,2,3) ]) - but you have to construct the list of options to remove BEFORE you can remove them. :confused:

I’ve considered all manner of formulas to try: index, substitute, find, etc.

Nothing would work for that scenario, I’d have to build some other way of working with the data to try and make it work; but if this was a list from OCR results…

1 Like

Yes, Matt, I tested all possible workaround, but all failed… I spent hours.
As you rightly said, when we scan (ocr) text and Appsheet nicely recognize all, then afterwords the question is how to cook them?
As @Fabian pointed out, it may contain rubbish, then how to remove those?

After deep consideration, I concluded the new feature like ForEach to reconstruct the array, sorry LIST need to be in place.

Will see !

1 Like

Maybe a crazy TEXT work around…
type vibe?

1 Like

Like what???

1 Like

I found a workaround for my case:
I only want numbers greater than 100000.
First I have to SORT() my list:
SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE)

Now I can search for the first time, the number is <100000 and use this as the number for a TOP() expression:

TOP(SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE),
INDEX(SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE),1)<100000,1,
INDEX(SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE),2)<100000,2,
INDEX(SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE),3)<100000,3,
INDEX(SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE),4)<100000,4,
INDEX(SORT(LIST(12 , 217435 , 217434 , 2019 , 1000),TRUE),5)<100000,5

The result is: 217435 , 217434


1 Like