ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

numeric input field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • numeric input field

    We have an input-field that's defined like this :

    A KLNRSS1 6Y 0B 3 10EDTCDE(3)
    A DSPATR(UL)
    A DSPATR(CS)

    Suppose we fill up that field with an initial value of '3' then it is displayed like this : ".....3"

    When the user wants to change the value towards "15" he starts typing (at the beginning of the field) so the field fills up like this "15...3" (the 3 remains)
    When we push the enter-button now, the blank fields are replaced by zeros and we get "150003" and so 150003 is also used on the enter-validation as value in the field

    Is there a way that we can get the 15 as final value that is used on the enter-validation ?

    As this field is displayed on a scanner (for clients), there are some restrictions :
    - we only have one button "enter" on the scanner so an "field exit" and a "enter" cannot be used as 2 buttons
    - the screen-validation is executed when pushing the enter-button
    - the change of field is made by using the "tab"

    Any ideas how to solve this ... by using some DSPATR- or CHECK-stuff ... or anything else ?

    Thanks for your replies

  • #2
    User presses the FIeld-exit or Field+ (I map the right ctrl as Field-exit and the + on numeric keypad as Field+) after typing in 15 and it will erase everything from the cursor to the end of the field.

    Comment


    • #3
      1. Ask the vendor if they have a solution. No sense reinventing the wheel.
      2. Can the scanner scan a FIELD EXIT barcode?
      3. Maybe add RANGE(1 1000). If the initial value is only 3, I am guessing 150003 is way outside the expected range.

      Comment

      Working...
      X