SPLIT() to produce a list of string characters

Hello,

I'd like a way to obtain a list of characters from a string, with each list item containing a single character from the string. This is particularly useful due to the lack of Regular Expression support in AppSheet, so that the generated list can easily be used to check whether there are extra characters outside an allowed range. 

For example, in order to check whether a user input has non alphanumeric characters, the only way today is, instead of matching for the allowed characters, the creator will have to write a long expression listing all possible non-allowed characters. 

Instead, if the input text can be turned into a list of characters, this check will be easy, using a simple expression like:

ISBLANK([list of characters in user's input] - [list of allowed characters])

To obtain the list of characters from a text string, we need a function such that:

  • Argument, text: "abc 1234"
  • Return value, list: {"a", "b", "c", " ", "1", "2", "3", "4"}

In js, as in other languages, this is done by setting the split delimiter to an empty string, like:

SPLIT("text string", "")

The idea is to update AppSheet's SPLIT() function to behave similarly; producing a list of text elements, where every element is a single character of the input string, when the delimiter is set to an empty string.

This is a small, simple feature request that will greatly enhance AppSheet's functionalities, especially given the lack of the would-be more complicated support for Regular Expressions. 

Thanks in advance!

Status Open
13 4 560
4 Comments
Tristan_Bennett
Bronze 4
Bronze 4

Please.

Joseph_Seddik
Gold 4
Gold 4

Yes, please!

UMassAmherstM5
Bronze 1
Bronze 1

Yes, please too!

Jean_Paul
Bronze 3
Bronze 3

It may not be the most comfortable way, but I was able to do it with an additional column, before starting, I wanted to do it with Auto Compute>Spreadsheet formula but I don't know how to do it.

Well, I created a column in google sheets called "test" and used the next formula: =ARRAYFORMULA(REGEXREPLACE(A2:A, "(.)", "$1,")(I guess you could also use appscript), and in appsheet I create a virtual column with SPLIT([test],",")

Jean_Paul_0-1684966934372.png