
Nintex introduced task outcomes in Office 365 back in February 2015. That’s great- if you use task outcomes. Task outcomes are powerful functionality. However, if you don’t want to use the outcome block, there are ways to avoid it.
When using Nintex on Office 365, you currently (Feb 2016) have two task actions available:
- Task
- Task process
The biggest difference is that the Task action is for one user, while the Task process action can handle multiple users.
These two actions work very similarly to the Flexi Task action from on-premise. They both use the task outcome functionality, which allows you to specify outcomes and creates a built in switch action for each outcome.
On Office 365, there is no Task action that does not use outcomes.
The outcome functionality really is powerful. If you can use it, then do so – using an alternative approach is possible, but means you are doing a bit more work and aren’t taking advantage of this built-in tool.
If you want to use the Task action on Office 365 without using the outcome functionality, here’s how to do it:
- Create a Task action in your workflow, if you haven’t already
- Open up the task form
- In the form settings > Custom JavaScript, add the following code:
NWF.FormFiller.Events.RegisterAfterReady(function () { NWF$("[value='Approved']").prop( "checked", true ); });
- Make sure the outcome control is hidden by using the following CSS:
.hideControl { display: none; }
Make sure to assign the class to the control:
The user never sees the outcome control and the JavaScript sets the control to “Approved” automatically.
In your workflow, you can now ignore the outcome branches. Alternatively, you can add actions to the approved branch and treat it as a rudimentary action set. My experiece is that it doesn’t really make the workflow easier to work with, but your mileage may vary.
Credit for the JavaScript and CSS go to Fredrik Ohrn (@FredrikOhrn).
Hi Hanna, I’m trying to use your workaround, but stilll get an error message stating that the field is requiered, although it is not visible any more. Do you have any solution for that?
I don’t have access to a Nintex test environment at this time and don’t have any hints for you. Sorry!
It’s ok, I have deleted the CSS class nf-form -input from the control’s settings and now it works fine for me, thanks for your useful post :)
Glad to help!