Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to restrict the field entries so that the first character has to be alphanumeric (regardless if its upper or lower case), as long as the first character is either a number or a letter. Therefore excluding all special characters.
Can anybody help with this?
Many thanks,
Jarren
May be this as the where statement:
Where Len(Trim(KeepChar(Upper(Left(FieldName, 1)), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'))) > 0;
Hi Sunny,
Thank you for that, I am trying to get this at script level, as there are multiple fields that require this but not all.
Could you help with that?
Many thanks,
Jarren
This is at the script level. You cannot use Where statement in the front end of the application.
Hi,
another solution could be:
Where IsNum(Left(Text,1)) or Upper(Left(Text,1))<>Lower(Left(Text,1));
tabTestdata:
LOAD ID,
Concat(Char) as Text
Group By ID;
LOAD RecNo() as ID,
Chr(32+Floor(Rand()*95)) as Char
AutoGenerate 50
While Rand()>0.1;
tabAlphaNumTestdata:
LOAD Text,
Text as TextAlphaNum
Resident tabTestdata
Where IsNum(Left(Text,1)) or Upper(Left(Text,1))<>Lower(Left(Text,1));
hope this helps
regards
Marco
please close your thread if your question is answered.
thanks
regards
Marco