Way to remove empty elements from a list?

Seems rather basic, but haven’t found a solution…

Looking for way to remove empty elements from a custom state list of text.

Currently have: Apples, , Bananas, Oranges
Want to achieve: Apples, Bananas, Oranges

Found a hack. :minus input box hidden on the page.

3 Likes

I found another way, take a look:
Let´s supose you have a “custom state” of a page, called Index, and it is a List (named: DanielList) and you want to add 4 items on this list, each item is another custom state (Task001, Task002, Task003 and Task004). So you have an workflow which populate the list as follow:

  • Index´sDanielList:plus item Index´sTask001:plus item Index´sTask002:plus item Index´sTask003:plus item Index´sTask004

In this example let´s supose that task002 is an empty value, like this if want to show the content of this list on a MultiLine Input a blank space will take a place between task001 and task003. In order to solve this, you can create another custom state, here we will gonna call it as EmptyCells, which value is empty by default. Then you just have to do as follow:

  • Index´sDanielList:plus item Index´sTask001:plus item Index´sTask002:plus item Index´sTask003:plus item Index´sTask004:minus item Index´sEmptyCells

All the empty values will be removed from the list. :grinning:

I used this
each item’s text:trimmed:filtered
and in the filter i choose “Text is not empty”
I hope it helps.

2 Likes