Question

I need a SharePoint task list which has different fields available for child tasks than the parent task.

Is this possible within SharePoint Online and what areas would I need to look at to achieve this?

Was it helpful?

Solution

The list can have fields that apply to the parent task and the child task.

For child tasks to have different fields available, one approach would be to create a checkbox labled "Child Task" and create a default New Item form for the list with modified html and some JavaScript included that hides the parent fields and displays the child fields when the box is checked. Then create similar custom Edit and Display forms that do the same thing based on that checkbox status.

OTHER TIPS

You could make a separate content type for the child items. Use the task type as a basis and add the new fields. You would need to have users intelligently select which content type to create.

If SharePoint Online is the same as SharePoint 2013, there is a field 'ParentID' that is filled in for child tasks, linking it to its parent. I assume SharePoint fills that in when you indent a task defining it as a child.

It's not included on the forms making it harder to use it to help hide/show fields, but you could add a checkbox like DevBot mentioned and have workflow set or unset it based on whether ParentID was set or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top