Flexi task- Decision always return -1

Hi All,

I have a flexi task configured as below:

I want to customize the approval form so that if it's rejected, comment would be mandatory but somehow Decision just returns -1:

And here is the Calculated Value settings:

Does anybody have a suggestion?


0 Kudos
2 Replies

Re: Flexi task- Decision always return -1

This is a common problem with the Decision field of a task form. Selection options (drop down options that is) return the 'value' attribute attached to them, and in the case of the Decision control, those values are numeric and based on whichever values that (as far as I know) are generated in some database (or possibly form data) once the form has been published. 

However, due to the nature of 'previewing' forms, the values are not taken from any live arrangement and are both given a default -1 value making it difficult to create rules ahead of time. 

Please use my comment located here: to achieve the outcome you are looking for without the need to create a new calculated control. 

If you require further assistance please ask. 


Re: Flexi task- Decision always return -1

@MegaJerk  I am trying to achieve this on Attachment control, however when i assign the decision control the JS variable. And apply a validation rule with the code you suggested on the control isn't working. is it something you can help me with.


i want to validate attachments, i can do it by changing the minimum attachments to "1". but i don't want the validation to work on reject case.


0 Kudos