2

I have tasks like this.

Task 1
   SubTask 1
       SubSubTask 1
       SubSubTask 2
          SubSubSubTask 1
   SubTask 2

How in SharePoint I can get them in this order ? All fields are not relevant, so, I am not sure how can I iterate through all tasks and find relationship between tasks and there sub-tasks and so on.

1
  • no sub task item field has any value that associates it with parent tasl Jan 16, 2014 at 16:42

3 Answers 3

3

There is a field which could be used for programmatically distinguishing: ows_ParentID

example for parentID

If this field is empty then the task is a parent task. It there is a value present then this means that the current task has a parent task with the ID that is stored.

Example for a rest call getting the parent Task of a Task with the ID of 2: http://site/_api/web/lists/GetByTitle('test')/items(2)/ParentID

0

SharePointer If you are using the new subtask feature in SP2013, all you need to do is is click on Edit this list. Next, on the task you wish to change the indention, click in the far left empty box to highlight the row. Click on the 'Tasks' ribbon tab and choose either 'Outdent' or 'Indent'.

If you also need to create a relationship between tasks, click on 'All Tasks' to get you back to the main view. Click on the '...' for the task that is dependent of a previous task and select the next '...' and then 'Edit Item'. Once in the Item detail, click on SHOW MORE. In the Predecessors list, click on the task that comes before this one and Add it to the box to its right. Repeat for all tasks that have dependencies. This may not show up with arrows connecting the tasks in the Timeline, but they should in the Gantt view. Hope you find this helpful.

1
  • I think the user wants to iterate over the tasks with code Mar 26, 2014 at 18:46
0

You can create SP D 2013 workflow with loops, such that it iterates through tasks and sub tasks, in case if you are looking to automate this iteration.

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.