I am new to K2. I have a workflow activity that has 2 outcomes, schedule and inquiry. The inquiry is to open up a comments page. How do I add a rule to K2 Designer that when the end user selects Inquiry, it opens up the comments page? Can you design rules based on the outcomes of the workflow?
I see several questions here. The first question is how to show a comments section based on a selection within the form. You can add the comments view to the form and on the initialize rule simply hide the view. Then on the control create an "On Change" rule. Then use an advanced condition that says if the control "Contains" Inquiry then show comments view or open comments as a sub view. Add another advanced condition that says if the control does not "Contain" Inquiry then hide the comments view and clear controls. The rule will look something like this...
When a control on a view raises an event "On Change"
Ignore the name of the control. This is just an example for you.
Use the control from the view where the user will select schedule or inquiry.
The rule should look similar to this.
You can also open comments as a subview and it will act as a popout window. The rules would be a little different but pretty much the same concept.
I hope this helps.
To answer your question about the workflow outcomes.
I generally use buttons on my form. I use an "On Click" rule to to action the workflow.
You can use Advanced condition on click. The FORM rule would look like this...
When a control on a view raises an even "Submit Button Click"
If a control on the view "Contains" Inquiry
Action a workflow (Configure the action to Inquiry)
Show Message to user
If a control on a view "Contains" Schedule
Action a workflow (Action for Schedule)
Show Message to user
You may also use conditions within the workflow.
In the outcomes window when configuring a workflow you can click on an outcome and edit the conditions. Each outcome can have a condition that directs the path of the workflow. For instance you can configure the Inquiry outcome where If a control contains Inquiry and the workflow will take that route.
On the Schedule outcome you can configure it to only take that route if the control in the view contains schedule.
If you need some screenshots let me know. I will provide them for you.