Reusing the actions

  • 11 August 2016
  • 1 reply
  • 2 views

Badge

Hi All,

 

How can I save set of actions in SmartForm so I can reuse them on different button clicks ?

 

Regards,

Imran

 


1 reply

Userlevel 1
Badge +8

Actions are specific to an activity in the workflow, so is his form dedicated to just one activity? Generally, what developers have had to do in the past is when they want to use buttons you have to abandon the idea of using actions pulled from the worklist item and hard code your actions into the form so that you could create a button for approve and a button for decline.

 

Each of those buttons can have a rule to action the workflow and that button would pass in the text value of the action it was completing. In more recent versions of K2, you could make the text of the buttons the action you are wanting to complete (Approve or Decline in this sceairo) and then have a third unbound rule that actions the workflow passing in the text value of the button that is called by the on click rules of either of the buttons. 

 

This nice thing about this approch is that when you update the form to reflect new actions with new buttons, those buttons just need to call the unbound rule, so it would make managing things a bit easier if you move away from the dropdown list action approach.

 

Here is a right up to get your started (http://help.k2.com/onlinehelp/k2smartforms/userguide/1.0.6/default.htm#Configuring_the%20_Approved_and_Declined_buttons_on_the_Denallix_College_Application_page.html) It doesn't cover the unbound rule part or using the text of the button, but at least gets you close.

 

The other option is a custom control that renders actions as buttons. You may check out market to see if that is already there.

 

S.

Reply