This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to check if a file contains alphanumeric characters

I work with appscript in SBM 12.1

I must check, in appscript, in a field contains only alphanumeric characters and I didn't find a funtion. Some wrote a funtion to do that?

Thanks for your help.

Tags:

Parents
  • 0

    Does that mean the file is ASCII or UTF-8 or UTF-8 with Byte Order Mark (BOM)??

    Does the file contain any TAB characters or CR/LF sequences? 

  • Suggested Answer

    0   in reply to 

    I think they are trying to check the value of a text field, rather than a file.... Christine, there are not any built-in SBM AppScript functions for this type of check. However, AppScript is based on VBScript 4.0. So, I would suggest googling for an vmscript function that does this check. I would guess that you could find some good example out there.

  • 0 in reply to   

    Arg!  Mis-read "Field" as "File".  Rented brain.

    Christine: Is this on a Transition form?  It would be relatively easy with JavaScript to strip any character in a Text field that isn't in the range of decimal 32 (0x20; ASCII SPACE character " ") to decimal 126 (0x7E; ASCII TILDE "~").

    The JavaScript could also confirm that a Text field only contains Alphanumeric chars without modifying the field.  What do you want to do with the result of that evaluation?

  • 0 in reply to 

    Hello, thanks for your answers. This is a script after a transition.  If the field is not an alphanumeric field, I stop the transition and the user must change the field value. It's not javascript or VBscript, it's teamscript. It's because it's difficult for me to find information in the web. 

Reply
  • 0 in reply to 

    Hello, thanks for your answers. This is a script after a transition.  If the field is not an alphanumeric field, I stop the transition and the user must change the field value. It's not javascript or VBscript, it's teamscript. It's because it's difficult for me to find information in the web. 

Children
No Data