SPLIT STRING INTO LIST
Does anyone know if there is a way to split a string into a list, please?
Many thanks!
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.
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.
User | Count |
---|---|
39 | |
29 | |
23 | |
23 | |
13 |