Returning a parameter to a form after Submit - InfoPath Dev
in

InfoPath Dev

Returning a parameter to a form after Submit

Last post 12-05-2011 03:13 AM by RonInOttawa. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-17-2011 05:35 AM

    Returning a parameter to a form after Submit

    Hello;

    I have an InfoPath 2007 form which uses a Web Service to submit data to a SQL Server Database.

    As we all know, submissions aren’t always successful and so my submit code lives in a Try-Catch. In the Catch, I capture the error message to a string that I would like to pass back to the form.

    My problem is this;

    1.       How do I pass the variable back to the form from the Web Service?

    2.       How and where do I receive the message back in the form?

    I know this must sound very basic, but for the life of my I’m totally dumbfounded by this.

    Not only do I want to display the error message, but I must also take some actions on success.

    BTW – My Submit button uses rules to fill in a field (Timestamp) and then submit the form. And I use VB.Net for coding, but if your examples are in C#, no prob, I can translate.

    Thanks for any help – Much appreciated.

    Ron…

    Cheers.
    Ron...
  • 12-01-2011 03:37 PM In reply to

    Re: Returning a parameter to a form after Submit

    Hi - you can set the message property of the XmlFormCancelEventArgs.

    This MSDN documentation should help you.

    Hilary Stoupa

  • 12-05-2011 03:13 AM In reply to

    Re: Returning a parameter to a form after Submit

    Thanks Hilary - That's twice now that you've saved my bacon - MUCH appreciated.

    Cheers.

    Ron...

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