How to set format of a string

I’ve searched but am struggling to find an answer

Is there a way to confirm that the string result is in a certain format? Ive seen length of string which may go someway to help
Users need to input a field in the format of
LNNNLLL
Where L is a Letter and N is a number - Its a reference number

Anyway that this can be validated with code to avoid user error in the input?

How about 7 adjacent small List Pickers, each for a letter (1,5-7) or number(2-4)?

Textbox Extension and some regex and maybe a regex extension

1 Like

Even with forcing the format, you still have to go out to your data base and lookup
some name and description data to confirm the right key was written.

Slightly longwinded blocks but it works with Taifun’s Textbox extension doing the heavy lifting

refNumber.aia (22.7 KB)

BLOCKS

Only tested parts of it, but think something like this should work (see below). Probably best to restrict user input to only be able to enter: LNNNLLL, then give error message to correct format.

Thanks - I ended up using Taifun Tools extension with some regex

Good point - Ive got a workaround for that at the moment - it flags as a new record but next up is to validate “live”

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.