Local field input only letter & number

  • kda
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 3 months ago #16249 by kda
HI all
I create one local field , allow only input a - z, A-Z & 0 -9

How should I do?

thanks

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #16250 by jpb
Replied by jpb on topic Local field input only letter & number
You can try :

- assign CHAR.TYPE = AAA
- create a record in ASCII.VAL.TABLE (e.g. KDA.AAA start with a copy of STANDARD.AAA) and add the numbers
START.RANGE 48
END.RANGE 57
- create a record in ASCII.VALUES - IN2AAA and assign your KDA.AAA to the application for which you have created the LOCAL.REF in the fields 4 to 7.

Not sure if it works for local fields . . .

Please Log in or Create an account to join the conversation.

  • kda
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 3 months ago #16251 by kda
Replied by kda on topic Local field input only letter & number
Thanks

Please Log in or Create an account to join the conversation.

  • kda
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 3 months ago #16255 by kda
Replied by kda on topic Local field input only letter & number
Hi jpb

Is there any available coding on it?

Thanks

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #16256 by jpb
Replied by jpb on topic Local field input only letter & number
I know no routine that checks for A-Z, a-z,0-9 but the fastes way is maybe using SEQX(), e.g.
        FOR I = 1 TO LEN(COMI)
            IF SEQX(COMI[I,1]) > 47 AND SEQX(COMI[I,1]) < 58 THEN CHECK = "OK"
            IF SEQX(COMI[I,1]) > 64 AND SEQX(COMI[I,1]) < 91 THEN CHECK = "OK"
            IF SEQX(COMI[I,1]) > 96 AND SEQX(COMI[I,1]) < 122 THEN CHECK = "OK"
        NEXT I
The following user(s) said Thank You: armin

Please Log in or Create an account to join the conversation.

  • kda
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 3 months ago #16261 by kda
Replied by kda on topic Local field input only letter & number
What is SEQX?

Thanks

Please Log in or Create an account to join the conversation.

More
10 years 3 months ago #16263 by jpb
Replied by jpb on topic Local field input only letter & number
SEQX is the 'to be used instead of' for SEQ, same as CHARX instead of CHAR.

Programming Standard :

Attachments:

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #24599 by sophia75
Replied by sophia75 on topic Local field input only letter & number

SEQX is the 'to be used instead of' for SEQ, same as CHARX instead of CHAR .

Programming Standard :

[attachment=470]15-08-201407-54-21.jpg[/attach
 

it's is really very helpfully post.

Please Log in or Create an account to join the conversation.

Time to create page: 0.096 seconds