Skip the outcomes on a Nintex task form on Office 365

Skip the outcomes on a Nintex task form on Office 365

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:

  1. Task
  2. 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.

2016-02-16_09-03-36

On Office 365, there is no Task action that does not use outcomes.

2016-02-16_09-03-58

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.

2016-02-16_09-05-54

If you want to use the Task action on Office 365 without using the outcome functionality, here’s how to do it:

  1. Create a Task action in your workflow, if you haven’t already
  2. Open up the task form
  3. In the form settings > Custom JavaScript, add the following code:
     
    NWF.FormFiller.Events.RegisterAfterReady(function () {
        NWF$("[value='Approved']").prop( "checked", true );
    });
    
  4. Make sure the outcome control is hidden by using the following CSS:
    .hideControl { display: none; }

    Make sure to assign the class to the control:
    2016-02-16_09-22-34

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).

4 responses

  1. 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?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s