Order of operations - InfoPath Dev
in

InfoPath Dev

Order of operations

Last post 02-19-2007 03:11 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-19-2007 02:01 PM

    Order of operations

    In vbscript, how do you run functions in a certain order? For example, I have form that I want save to a shared location, names the form, prints the form and finally closes the form. I can get everything to work great except my form closes before it prints. How can I print my form then close it? Here is my code:
    XDocument.Printout

    Application.ActiveWindow.Close True
  • 02-19-2007 03:11 PM In reply to

    Hey JL,
    Have you considered having a rule that calls the XDocument.Printout code and then changes the state of a boolean (yes-no) field in the form to true (default is false). Add two sections which are conditionally shown or hidden based on that field. In the first section, drag the button that prints the form and make the condition for the section hide when the field is true. Now, the rule behind the button, calls your XDocument.Printout and then sets the field to true which hides it. The second section has a condition that hides the form if the boolean field is false, so when it becomes true it is visible. In this section, but a button to close the form which calls the Close True code. Now you have a solution, albeit one that requires an additional manual step.
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.