If All(PTSF_SRCH_ENGN.PTSF_SRCH_ENG_INS.Value) Then
&Name = PTSF_SRCH_ENGN.PTSF_SRCH_ENG_INS.Value;
&I = 1;
If IsAlphaNumeric(&Name) = False Then
While &I <= Len(&Name)
/* Test to see if failure is because of _ or - or not*/
&testchar = Substring(&Name, &I, 1);
If (IsAlphaNumeric(&testchar) = True) Or
(&testchar = "_") Or
(&testchar = "-") Then;
&I = &I + 1;
Else
Error (MsgGetText(78, 33, "no spaces or punctuation are allowed"));
&I = Len(&Name);
Break;
End-If;
End-While;
Else
/* test for number in first position*/
&testnumberpos1 = Substring(&Name, 1, 1);
If IsDigits(&testnumberpos1) = True Then
Error (MsgGetText(78, 33, "no spaces or punctuation are allowed"));
&I = Len(&Name);
End-If;
End-If;
End-If;