Comments required not working in FlexiTask

  • 9 April 2016
  • 6 replies
  • 12 views

Badge +9

I have a workflow where I set the Comments to Required on Rejection. Everything was working OK until I customized the form with Nintex Forms. Is this the expected behavior and I should put my own rule in if the form is customized? Thanks!

2016-04-08_15-52-48.png


6 replies

Userlevel 6
Badge +12

Hello Igor Karon​ -

Check out Using validation rules to ensure a comments box is not left empty

If you use Nintex Forms you will need to add in a rule on the Comments field.

The rule will be straightforward:

and(isNullOrEmpty({Self}),Decision==2)

Here is the outcome in action:

182419_pastedImage_1.png

Hope this helps!

Badge +16

just to add to this, I have had occasions before where the response value (Decision) is not the expected 2 (this can happen when you change the outcomes on your flexi task action).  if what Jesse suggests doesn't work, add a calculated field to your form for de-bugging purposes outputting the value from decision so that you can see how to modify this bit above:

and(isNullOrEmpty({Self}),Decision==2)

Thanks
Cassy

Badge +11

And to add even more to this:

You also have to be aware that in the preview mode the decision will always return "-1". If you published the form and use it in your process, the outcome will be the correct number. If you want to know, which numbers stands for your outcomes, you can have a look at your Nintex DB (if you have sufficient permissions).

Capture.JPG

As you can see, in my case there are multiple custom outcomes. The "Id" value, is what will be returned in your form.

Regards

Philipp

Badge +9

Thank you all for all the valuable information!

Userlevel 6
Badge +12

One more caveat to be aware of - these outcomes/IDs can vary across your site collections and farms.  They are set in the ConfiguredOutcomes table.  If you notice differences in behaviour between your dev/test/prod etc farms, that's why.  Only way to be certain is to interrogate that table for each environment and adjust accordingly (maybe use a constant).

Cheers,

Chris

Badge +1

To add even a bit more to this.. happy.png

You can find the outcome # in the web page's HTML code when you run the workflow. For non-farm admins this can be really effective.

So if you're using IE..

  1. Open the task form
  2. Open the developer tools (F12)
  3. Enable select element
  4. Select the radio button for the outcome.
  5. It'll select something in the code, look for the INPUT tag. It'll have a name, disabled, id, type, and value. The value is the # for your custom outcome, and you'll also notice that Approve is 1 and Reject is 2.

Cheers

Josh

Reply