1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Fill-In validation with N format

Discussão em 'StackOverflow' iniciado por fdantas, Outubro 19, 2017.

  1. fdantas

    fdantas Administrator Moderador

    I have a fill-in with the following code, made using the AppBuilder

    DEFINE VARIABLE fichNoBuktiTransfer AS CHARACTER FORMAT "N(18)":U
    LABEL "No.Bukti Transfer"
    VIEW-AS FILL-IN NATIVE
    SIZE 37.2 BY 1 NO-UNDO.


    Since the format is N, it blocks the user from entering non-alphanumeric entries. However, it does not prevent the user from copypasting such entries into the fill-in. I have an error checking like thusly to prevent such entries using the on leave trigger:

    IF LENGTH(SELF:Screen-value) > 18 THEN DO:
    SELF:SCREEN-VALUE = ''.
    RETURN NO-APPLY.
    END.
    vch-list = "!,*, ,@,#,$,%,^,&,*,(,),-,+,_,=".
    REPEAT vinl-entry = 1 TO NUM-ENTRIES(vch-list):
    IF INDEX(SELF:SCREEN-VALUE,ENTRY(vinl-entry,vch-list) ) > 0 THEN DO:
    SELF:SCREEN-VALUE = ''.
    RETURN NO-APPLY.
    END.
    END.


    However, after the error handling kicked in, when the user inputs any string and triggers on leave, error 632 occurs:

    error 632 occurs

    Is there any way to disable the error message? Or should I approach the error handling in a different way?

    Continue reading...

Compartilhe esta Página