Don't close InfoPath form

  • 1 June 2009
  • 1 reply
  • 5 views

Badge +5

Greetings.  I have an InfoPath based process that uses one InfoPath form and is rendered via Form Services.  I am using the OOB Submit button so all of my rules that get executed when a user clickes 'Submit' are configured via 'Tools -> Submit Options -> Rules'.  I am trying to put some error checking on my Submit rule that prevents the form from being submitted if a value = TRUE.  In order to accomplish this I have two rules that get executed before all the other submit rules:


1. Execute SmartObject method (no conditions on this rule)
2. If (SmartObject.Property IS NOT BLANK)
    then
    Set local XML field value = TRUE
    'Stop processing rules when this rule finishes' is checked here. 


So the idea here is stop processing all the subsequent rules if a value = TRUE.  I have a section on the form that has conditional formatting that if my value = TRUE then the section will be visible and it basically warns the user that they need to do something prior to submitting.  I am also attempting to use a custom 'Close View' that should be switched to after all the submit rules have finished. 


The problem I'm facing (image below) is that K2 appears to be changing the form submit options to 'After submit:  Close the form'  and this behavior wipes out all of my custom rules.  I need the form to stay opened and simply switch to my custom view that tells the user that they can now close the form.  If I don't have this, then my TRUE/FALSE rule described earlier will execute, all other rules will stop exectuing, but the form closes and the user can't see the warnings and it remains in his/her K2 work list. 


Any thoughts are appreciated.  Thanks.


submitoptions.jpg


1 reply

Badge +8

Erice,


I ran into this a long time ago, even on K2.net 2003.  So the deal is that everytime the K2 wizard is run, it will reset back to that setting.  This is needed because if the form IS NOT CLOSED, what can happen is if the user does not close the InfoPath form quick enough, errors will occur.  The reason is that after the user submits an action, K2 will go to the form library and delete the form (except when it is being initially submitted).  If the user does not close the form quick enough the K2 process will fail because the user currently has the form open.  This is not a bad thing either.


Honestly I am surprised that your custom rules are being lost, because I have that before in K2 blackpearl.


One suggestion I have is that you use validation rules on the datasource rather that on the submit button.  If there are errors in the data source, the submit WILL NOT WORK.


In the K2 book for InfoPath I wrote a section on Good Design Considerations for InfoPath.  I specifically have a section on Working with Required Fields that you can check out if you have it.


Jason


 

Reply