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! Go to Solution.
Try:
CONCATENATE(
LEFT("L0001", LEN("L")),
RIGHT(
(
"0000"
& (
NUMBER(
RIGHT(
"L0001",
(LEN("L0001") - LEN("L"))
)
)
+ 1
)
),
(LEN("L0001") - LEN("L")))
)
@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.
Try:
CONCATENATE(
LEFT("L0001", LEN("L")),
RIGHT(
(
"0000"
& (
NUMBER(
RIGHT(
"L0001",
(LEN("L0001") - LEN("L"))
)
)
+ 1
)
),
(LEN("L0001") - LEN("L")))
)
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |