Can LC tell whether a character is a number or a letter? I have a locked field with list behavior set to true that lists the chapters of a title in a legal code, e.g., "Chapter 6 - Retirement Fund." However, the Legislature named a few chapters like this, "Chapter 23A - Government Claims." The latter naming convention (number plus letter) "spoils" the following script:
Code: Select all
put the selectedtext into tSelection
put the second word of tSelection into tChapterNumber
if tChapterNumber < 10, then
[statements]
else
[statements]
end if
LC will not recognize "23A" as a number greater than "9", so the the statements after "else" will not execute. If all number+letter "words" in the chapter names were the same length, I know how to extract the number, but they could be 2, 3, or 4 characters in length, e.g., "9A", "25A", or "100A."
If the number absolutely must be extracted from a variable-length chunk, I am guessing that there is a custom function that could do it, but I can't find any discussion in this forum, the User Guide, etc. Is a custom function the answer? Thank you for any suggestions.
Monty May