Help creating IP form with 2 approval levels and controls that r enabled at each approval level

  • 18 September 2008
  • 4 replies
  • 0 views

Badge +3

I am trying to create a workflow


1. which will have two stages of approval.


2. Has some sections / controls which only get displayed/enabled at each approval stage. The controls are for entering comments during approval.


3. which does not need to me to create 3 different views to achieve this


 


I have gone through the Blackpearl documentation's infopath integrated Expense Claim approval tutorial, which uses two views. This example used two actions & outcomes for 'approve' and 'decline'. Can I just create a workflow without these actions/outcomes. I just want to take my submitted IP form to two levels of users who just enter some comments in the document.


Thanks for your help in advance.


4 replies

Badge +7

I see no other way to achieve this as over different views. You can save time by using the K2 - DocumentView field to enable/disable your controls. Than you can simple copy the view.


I'm not sure but I think one outcome is needed for a client event. But of course you don't need to name it "approve". It must be possible to prefill your action field and hide it in the form (if you like to do so).

Badge +4
Is there an order in which these users have to comment? do they need to see each others comments?
Badge +3

Thanks man_anja. 


I was thinking it should be possible to implement without views.


Looking at the best practises from Jason Apergis's blog I get some suggestion that it might be possible, but still not clear as to how it is implemented:


http://k2distillery.blogspot.com/2007/09/sharepoint-infopath-and-k2net-best.html


4) Remove Views and Create a Single View
If you have many views (let’s say more than three) and you commonly have to make changes in each and every view every time there is a change, consider collapsing down to one view. Again introduce a state field into the InfoPath form that will be set by K2.net. Then InfoPath can use conditional formatting to hide those fields based upon the state of the workflow.


Jey,


yes the two stage approval neeeds to be done in particular order. The comments entered during the first stage approval will be visible during the next stage of approval.


 Thanks.

Badge +11

Each client event needs at least one action/outcome, even if it is the default "Task Completed".  You don't need to show this on the InfoPath form.  In the form's schema is a group called _K2 and inside that is an element called ActionName.  Sometime during the life of the form, simply set this element to your default action and specify in the InfoPath Client Event that you want to uset this field without attaching it to a control.  I've used this before and it works fine.


If you only want to use one view, you could show/hide controls based on the contents of some field.  Simply set the value of that field in a server code event in an activity before your InfoPath client event, then in the load event of the form take some action based on the value in that field.


David

Reply