1

I'm using Document Sets in a Sharepoint 2013 Online system. There are several workflows for my Document Set that create tasks using the "Start Task Process" action.

My goal is to get the Task list on the Document Set Welcome page to show only tasks associated to the Document Set.

I tried to use the solution in This Article, but the "WorkflowItemId" column doesn't seem to exist. I don't have a "Workflow Tasks" list, just "Tasks", so perhaps I'm missing something here.

Since the Document Set ID is not directly stored as a column in the "Task" List, I found a column called "Related Items". That column has a JSON list that contains the items, it looks like this:

[{"ItemId":21,"WebId":"b7164bd7-db95-4948-88b5-0edd86b8ce2d","ListId":"152f780e-9f33-403f-8a3b-2974ab673346"}]

I can't create a calculated column against "Related Items" since the field is not available, so I then took a look at creating a workflow that fires on Task creation. It grabs the "Related Items" value and stores it as a string in a new column I called "Related_Item_JSON". I can then use a calculated column to get the ID. **If this can be done in the workflow, I couldn't figure it out.

The first issue comes up with the Workflow. Because I am creating the task in the Workflow, the Workflow that I created to run on task creation does not fire. I read this is a security feature, but if there is a way around it, it would probably solve this problem.

To continue testing, I ran the workflow manually so I had the ID available in my calculated column. I created a variable that would grab the QueryString ID from the Document Set Page. When I filter the calculated column to equal this ID it does not work, but if I switch to contains it does. I believe this is because the calculated column is returning "string#21" instead of just "21". I've tried adding string before my QueryString variable, but it doesn't seem to work that way.

<Contains>
    <FieldRef Name="Calculated_x0020_ID"/>
    <Value Type="Text">{workflowitemId}</Value>
</Contains>

So the second component to my issue would be how to get my filter condition to be equals and work.

2
  • In talking with Microsoft Support, I was able to use a 2010 workflow for the Task Creation. Now I just need to figure out how to make the Filter work against my calculated field, or use the 2010 workflow to parse the ID out so I have a more pure column.
    – MrMatt
    Commented Feb 23, 2017 at 15:32
  • Switched to a 2010 workflow, the Task list it was assigning the tasks to does have the WorkflowItemId. Might switch to the 2010 workflow since I keep hitting snags with the 2013 ones.
    – MrMatt
    Commented Feb 28, 2017 at 17:55

1 Answer 1

0

I do it a bit differently. I created a column in the Document Set called 'Current Task Link', (a multiline text field since my URLs were too long to be in a URL column) and show it on the property page. In the workflow that creates the tasks, I default that column at the start to

Detail of current review

That's a link to the main workflow status page, which shows all the tasks that are created during that workflow.

If a task is rejected and I stop the workflow at any section, I change that value to say "History of returned review" - the URL stays the same. I also change the field at the end to say "History of completed review" at the end of the workflow.

If you have multiple workflows that are running you might need multiple fields, or figure out a way to combine all the links into one field.

2
  • How do you get the link to the task? I don't know if this would work since my workflow is assigning tasks to multiple people, meaning I could have 6 links, but I'm curious.
    – MrMatt
    Commented Feb 24, 2017 at 12:55
  • I don't go down that deeply. I just give them the page that shows the workflow context - it has links to all of the different tasks that have been created. That link is in the Workflow Context:Workflow Status URL - sorry thought I put that in my post above. I've got a workflow that creates 5 different tasks, some are parallel, but most are one after the other. It's easier to just show the workflow page so everyone can see the status of all the tasks. Commented Feb 24, 2017 at 22:33

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.