Error in Matrix-form closes form

fve
fve Member Posts: 28
Hello,

I have a matrix-form where editing is allowed. Above the matrix are some filter-fields as well.

When data is entered in the matrix-form, certain checks are performed. This also is the case for the filter-fields.

Now we have this strange problem where certain fields cause the form to completely close after an error-message is generated. The error is shown, then the form closes.

Other error-messages caused by the input-validation are handled correct.
Does anyone recognise this strange behaviour? ](*,)

By the way: All error-messages in the validations are programmed the same way with the ERROR-function.

Comments

  • kriki
    kriki Member, Moderator Posts: 9,121
    You should put the error-handling in the "OnValidate"-trigger.
    If you put some error in the "OnAfterValidate"-trigger, the form is closed.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • fve
    fve Member Posts: 28
    Thanx a lot!
    It workes perfectly now :D
  • ara3n
    ara3n Member Posts: 9,258
    You can also create a function called myError(errormsg);

    myError(errormsg) begin
    error(errmsg);
    end;


    In your code call myerror instead of error.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n