Showing results 1 to 2 of 2

Thread: String entry format enforcement?

  1. #1
    Join Date
    29.01.2016
    Posts
    24

    Default String entry format enforcement?

    I have a requirement to enter a string the format of which should be 3 letters, followed by 6 numbers

    AAA123456

    I can't find the manual section that helps me deal with ensuring data entry occurs in this manner.

    The only thing I can think of so far is having two keyboard, one with only letters, another with only numbers and having two data entry boxes, one triggering the number keypad, the other triggering the letter keypad, then stitch the two strings together somehow. Clearly this is awkward extra complexity that nobody really needs.

    Is anybody aware of a generic string format functionality that would ensure I get my inputs formatted correctly?

  2. #2
    Join Date
    18.07.2011
    Posts
    136

    Default Re: String entry format enforcement?

    hi.

    On the fly the only way I could think of is evaluating the ASCII code of each character entered. zenon logic offers lots of string operations you might want to use for your issue. But this would mean that you need to evaluate each character right away when it was entered. For the first 3 characters you check if the ASCII code is A-Z and for the others you check if ASCII code is 0-9 using the zenon logic ASCII function.
    Also hard to tell how this will work out in terms of performance....

    Otherwise your idea having two different variables, one for the characters and one for the numbers should work as well. You could then use the zenon logic concat function to combine both strings.

Similar Threads

  1. Replies: 2
    Last Post: 22nd February 2016, 09:39
  2. Custom text string format
    By sdolnyy in forum zenon Operator
    Replies: 1
    Last Post: 25th September 2015, 07:42
  3. Replies: 1
    Last Post: 10th March 2015, 13:22
  4. Variable reaction matrix's limit text entry
    By dario in forum zenon Supervisor
    Replies: 5
    Last Post: 7th May 2013, 06:59
  5. String length field for STRING variables.
    By stolyarov_as in forum zenon Supervisor
    Replies: 3
    Last Post: 11th January 2013, 07:49

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •