Question

Subform won't stay open

  • 11 January 2024
  • 6 replies
  • 71 views

Badge +4

I have an approval process in K2. 

This is the bottom of the approval. The user is supposed to Create a PDF before clicking submit. 

What i am trying to do is add a subform to the process that is triggered when the user is approving and they hit submit. They should see this subform popup. 

If they click submit the workflow continues. If they hit cancel, it stops and goes back to the approval screen.

 

I have setup rules on the Submit and Cancel buttons in the subform. Cancel just says close the subform and stop the process. Submit says close the form ...and the workflow should continue.

 

The problem I am having is that the subform flashes up and then closes. It doesn’t stop and give the user the ability to action the subform. 


6 replies

Userlevel 5
Badge +13

Can you show us what the rule looks like that pops up this sub form? Basically, it should open the sub form and not do anything else. The sub form button rules would then drive continuing the workflow.

Badge +8

Hey @FreeRangeDingo , wouldn’t it be much simpler to just use the “Get Confirmation” Action?

In the Rule, everything below the Get Confirmation will get executed if they click OK, otherwise everything below it is ignore…

 

Badge +4

That sounds much simpler. I’ve never used Get Confirmation, so I didn’t know it existed. Will give that a try.

Badge +4

@Deon  I tried using the get confirmation from user. The problem is that regardless of whether I click OK or click Cancel, it moves forward in the rule execution. It does not stop and go back to the form if I hit cancel. This is what it looks like this...

 

 

Badge +8

 Yip @FreeRangeDingo , working as designed. 

It gets a bit tricky with if-else statements. (and somewhat counter intuitive).

Only the rules directly below and in the same block does not run when you click cancel.

But everything outside of the block, including the else if the advanced condition gets executed when you click cancel.

I good strategy is to use unbound rules (i.e. has no event) as ‘functions’ to encapsulate a block of command and then use the ‘Execute another rule’ action.

This should explain it a bit better…

 

 

Badge +4

@Deon Thank you for putting together the example. The visual was much easier to understand than the explanation. I really appreciate that.

I put together exactly what you showed above, but it still did not stop the workflow from progressing when I hit cancel. After re-reading your explanation, I think I might need to add a stop step. I’ll try again tomorrow.

Reply