Trouble with user defined error - InfoPath Dev
in

InfoPath Dev

Trouble with user defined error

Last post 07-30-2009 08:48 AM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-30-2009 07:37 AM

    Trouble with user defined error

    My form has code that under a certain condition adds an user defined error to a node: 

                  this.Errors.Add(errorNode, "USER_DEF1", "the error message", "the more detailed error message", 101, ErrorMode.Modeless);

    The error is added succesfully to the FormError collection. When I try to submit the form, shouldnt I see that the textbox (which is bound to the errorNode) with a red dashed line and not be able to submit the form ? It seems that this error is ignored, I can even submit the form.

    For another node (bound to another text box) the same line of code works perfectly and I get the red dashed line.

    Does anybody have an idea what might cause this issue ? 

    Thanks, Alin 

     

  • 07-30-2009 08:11 AM In reply to

    Re: Trouble with user defined error

    How strange! Especially since the code is working for you on a different node. Is there anything else that might be affecting the value of that field and possibly causing it to re-validate and succeed?

    Hilary Stoupa

  • 07-30-2009 08:32 AM In reply to

    Re: Trouble with user defined error

    The only thing which is different is, that this node is bound to a text field in one view, and to a drop down list in another view. Might this be an issue ? (The other node, where the code is working, is only bound to a text field in one view).
    But I have the same form available in Infopath 2003. There it works, the issue only showed up after migrating to 2007.

    I have seen a similar issue when migrating forms to Infopath 2007. In one case, there was also an error that was "invisible". I changed the text box to a label, then I saw the read dashed line. I changed it back to a text box and I got the red dashed line also for the text box. Strange... !

     

  • 07-30-2009 08:48 AM In reply to

    Re: Trouble with user defined error

    Stranger still! How about the Design Checker? Any clues there? What happens if you temporarily place another control on the form that is bound to the same node (the one where the error isn't showing on the current controls)?

    Hilary Stoupa

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.