SPLIT STRING INTO LIST Does anyone know if t...

SPLIT STRING INTO LIST

Does anyone know if there is a way to split a string into a list, please?

Many thanks!

0 8 1,824
8 REPLIES 8

You can make the column ENUMLIST or make a VC which is a copy of that column.

@Bellave_Jayaram Hi Bellave. Thanks for your reply!

What I am trying to get at is splitting a string in a single cell (e.g. โ€œTEXT 1; TEXT 2; TEXT 3โ€) into a list showing each item as a separate choice, either with ENUM or ENUMLIST formulas.

Could you clarify how exactly I can do that by using ENUMLIST or VC, please?

The string has to be comma separated for my suggestion to work. Otherwise I would recommend a sheet formula to split the single cell and use transpose to put the values in a column.

Hello @Bellave_Jayaram,

Is there a way to automate the transpose/split function?

Thank you.
Tiffany

If you mean in a spreadsheet directly, you can use a formula like =transpose(split($H2,โ€™,โ€™)) if H is the column which is an ENUMLIST in AppSheet. But it depends on what your actual need is. You should explore using actions to create new rows and/or populate columns in other tables based on an ENUMLIST in one table.

@Bellave_Jayaram Thanks Bellave! One last question, please: is there a way to make the app ignore certain commas in the string when using ENUMLIST, since they actually refer to the text, not splitting marks?

For example, in the string โ€œNovember 26, 2018, November 28, 2018โ€, ENUMLIST turns all commas in the string into a splitting mark, and I end up with 4 choices (i.e. November 26 / 2018 / November 28 / 2018) instead of 2.

I tried using inverted commas, but that didnโ€™t work.

I donโ€™t think it will work. Can you live with a string like: Nov 26-2018, Nov 28-2018 ?

@Bellave_Jayaram Yeah, I think I can live with that. Thank you very much. I will try and see if it fits for the purpose.

Top Labels in this Space