Skip to main content

Hi everyone,

 

I'd like to know if there is a way to complete a task from a list view. 

Obviously, the task has only 2 outcomes (approved and rejected) but it would be so cool to make this with more outcomes.

For example, i thought about a checkbox displayed in a column with a script behind who say "if checkbox = true then task's outcome = accepted".

 

I tried to understand how the outcomes works with O365 but it looks like it is really different than sharepoint 2013.

 

Why I want to do this?

To allow someone to approve different tasks at the same time.

 

Thank for your answers.

Hi Pierre,

This is a good question, SharePoint actually requires a few things to be done for a task to be 'completed' in the sense that the Workflow engine receives a notification to say the task is completed.

Unfortunately, the way this occurs via the UI is with some tricks on SharePoint's side. If you are editing a task in the default edit form and click one of the Task Outcome buttons at the bottom of the task, you will see that some fields change on the UI before it is saved. 

Here is how we treat tasks in order to have SharePoint recognise a task as completed (in the case of LazyApproval) which may help:

Outcome = (Set to valid outcome)

PercentComplete = 1 (100%)

Task Status = 'Completed' (this word varies based on the language of your site!)

When those three fields are set and the task is saved, the workflow will continue. As far as having a simple single click for users to complete the task, this may not help very much!

There are actually more scenarios based on the type of site template you are using, language and a few other odd things we have seen in some sites over time. Depending on your solution, you may be able to use the JSOM or REST API and some code to complete this via a button.

Hope this helps

Callum


Reply