0

I have a list where an approval workflow is attached. In this workflow, there are about 5 approvals that need to be done throughout the process. Email notifications are sent whenever an approval task is assigned to a user. The user clicks the link, and is taken to the page where they can do their approval.

What I'm trying to do is allow the approvals to be accessed from either:

  • the list view

or

  • the list item itself (from the EDIT page, or similar)

...and I can't find an option to do this. The Lookup column type won't give me the information that I need. How can we make this happen?

2 Answers 2

0

As the task items are stored in a separate list and assigned to the user they need to be action on that list item, it's only the workflow which associates the task to the items the workflow is running on.

Options - using of of the box list form you could edit the form and add the tasks list view web part filtered to match the list item title and not completed

  • If using custom forms(Nintex e.t.c), I query the task list and display all the pending items in the form and when clicked they open in a modal window for the user to action.

This is an example of the REST Url I use to get all workflow tasks

webURL + 
"/_api/web/lists/getbytitle('Workflow Tasks')/items?$select=AssignedTo/Title,*&$expand=AssignedTo&$orderby=ID desc&$filter=WorkflowOutcome ne 'Not Required'"

Then in the forEach loop of the returned items you can use Workflow.Url and find the Id from the list item in it using indexOf

if ( (data.value[i].WorkflowLink.Url).indexOf(listItemID) >= 0 ) {
                      //build html for link
};
0

I had a similar issue, One option is to add the workflow column to the list view. BUT if you do this in 60 days those links will start to disappear because a clean up timer job runs to help with site performance. If you expect this workflow to be used longer than 60 days I suggest you use the method outlined in this article. Basically you use a calculated field to create a hyperlink for each item. The hyperlink goes to the workflow history list filtered to show only information for that item.

To make this most helpful, make sure you have steps in your workflow that "Log to the history list" after key events.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.