Close Infopath after form submit

  • 4 March 2008
  • 8 replies
  • 2 views

Badge +5

Hi,


I have built an Infopath Integrated Workflow that as a couple of activities and infopath client events using a total of 6 xsn forms.


All the forms have the option "after submit -> close form" however when running the k2 workflow on all 6 forms when i click submit in infopath the form is submit successfully but infopath remains open.


If i decide to user the K2 Task Panel and use the submit button there, then infopath closes. The issue is that my customer doesn't want to use / see the K2 task Panel so i must be able to close infopath after submit in the "normal" way.


Any ideas why infopath remains open?


Thanks


8 replies

Badge +7

Hi jarrostick,


this is an infopath setting, I'm sure there's a rule you can add in the submit rules to close the form following a submit. If you disable the user's ability to save the form (also an infopath setting) the user wont be prompted when they submit, to save a local copy of the form.


I'll ask one of my colleagues this morning to send you a more detailed reply if you wish


Martin

Badge +5

Hi Martin,


i would really appreciate your help on this. I'll wait for any input you can send.


Thanks in Advance.

Badge +8

How did you configure the "Submit" behaviour?


It should use "Perform custom actions using rules" (in Tools menu, Submit Options). Then you create a rule with at least two actions: Submit (using the K2 Data Connection) and Close Form.


It works here.

Badge +5

Hi Nicolas,


I can follow you until the add of the Close Form Action. I don't have such action available in Infopath, what i have is:


"Show a dialoh box message"


"Shoa a dialog box expression"


"Switch views"


"Set a field's value"


"Query using a data connection"


"Submit using a data connection"


"Open a new form to fill out"

Badge +8

Oops, sorry! There was a little confusion in my mind... I use "Rules and Custom Code" on my "Submit" button, this is where I use the "Close Form" action. In fact we always use our own submit button, as we got rid of the Infopath ugly toolbar (ugly compared to our graphic charter, no offense :-)


You're right, there's no "Close Form" item in the Submit Options dialog box. However, I tested your config, using "Submit After: Close Form", enabled the toolbar with the Submit button again, and my form closed after I submitted it. I think the origin of your problem is not the way you configured your form.

Badge +2
Using InfoPath's submit button closes the form, but leaves InfoPath itself open. If you want to close InfoPath itself then maybe you could peak at the code behind the K2 task panel submit button to see how that does it - take a copy of your .xsn file, rename .cab and extract taskpane_new.htm

Simon
Badge +5

Well taking Nicolas idea, i skipped the problem using a custom button to do the submit, this way i can add the action to close the form!


thanks guys

Badge +2

In my case sub form "close" button close the sub form in designer..but when i run the same from "runtime" its not work 

for testing purpose i just add simple form with sub form In main form i put the button which open the sub form and in sub form there is just a close button to close the form ..its work fine in designer but not in runtime...client is sufferening and angry :(

 

i m using k2 desinger k2 forms not infopath

Reply