Separating the characters of a string into a list

Lance
New Member

I want to increment a value: ex. “L0001” while maintaining its format.

Prior to using Appsheet, I used regular expressions to maintain the format but I am lost now as to what to do when I can only use the provided expressions. I think I can work around this problem if the text was converted into seperate characters stored in a list, but I do not know how to do that. Thanks!

Solved Solved
0 2 388
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Try:

CONCATENATE(
  LEFT("L0001", LEN("L")),
  RIGHT(
  (
    "0000"
    & (
      NUMBER(
        RIGHT(
          "L0001",
          (LEN("L0001") - LEN("L"))
        )
      )
      + 1
    )
  ),
  (LEN("L0001") - LEN("L")))
)

View solution in original post

2 REPLIES 2

@Lance
How do you want to increment that value? Bear in mind that sequential numbering won’t be working well provided 2 users are entering data at the same time as it might create duplicate values. It’s not recommended also if you have the intention of using this value as a key column value.

Steve
Platinum 4
Platinum 4

Try:

CONCATENATE(
  LEFT("L0001", LEN("L")),
  RIGHT(
  (
    "0000"
    & (
      NUMBER(
        RIGHT(
          "L0001",
          (LEN("L0001") - LEN("L"))
        )
      )
      + 1
    )
  ),
  (LEN("L0001") - LEN("L")))
)
Top Labels in this Space