none
multiple instance of content type in a list RRS feed

  • Question

  • I need a structure to store task information. I wanted to create a Sharepoint List for the same. It should look like

    Title
    Created by
    Assigned to
    Priority
    Attachment
    Steps (1-n)

    In this structure, there can be multiple steps. Step in itself will be a content type with some detailed information. My problem is there can be multiple steps in a task. How do I achieve this (having multiple instances of a content type in a single list instance)? Like in a programimg language one can have array of another type as member variable in a new type.

    Thursday, June 2, 2011 1:22 PM

Answers

  • Bit of a pain but if you estimate the maximum number of steps a user will enter, add these to your list (say 50 steps) and use conditional formatting in infopath to only show the next item if the previous item is populated with data.  You could use some javascript on the list view to hide any column not containing any data so you don't have a massive page full of empty columns.  Not the most elegant of solutions, but it may just help.

    See http://vanillacloud.com.s114622.gridserver.com/infopath/infopath-conditional-formatting-showhide-optional-section-via-checkbox-or-radio-buttons for an idea.

    Thanks.

    Keith.

    • Marked as answer by Wayne Fan Thursday, June 9, 2011 9:04 AM
    Thursday, June 2, 2011 3:50 PM
  • It sounds like you're describing a One to Many relationship, where a task has many steps, or a parent type has many instances of a child type. So I'd create both a Tasks lists and a Steps List. You can create the relationship by using a multi-value lookup column. CRUD can get kinda clunky in OOTB SharePoint, but InfoPath should make the experience of creating tasks and steps slicker.
    • Marked as answer by Wayne Fan Thursday, June 9, 2011 9:04 AM
    Thursday, June 2, 2011 3:54 PM

All replies

  • Do you mean there can be child steps to a parent step?  If so, have a look at Cascading Dropdown over at http://spservices.codeplex.com/

    I'm sure you could add some javascript/jQuery to hide additional dropdowns / steps if they're not required.

    Not sure if that's relevant, but it may help?!

    Keith.

    Thursday, June 2, 2011 2:36 PM
  • Or you could create a new list which contains a text box for each steps (so you can have multiple items in the same list), and link it via a lookup to the original task list, so when you click on the original task list, it shows the additional related steps from the other list underneath in a webpart, with a link to add additional steps - remember your users will have to reference the original task in the lookup column.
    Thursday, June 2, 2011 2:39 PM
  • Yes this is an option, but not feasible because a normal user only knows how to create and item. I was kind of thinking in terms of InfoPath Form Library, but again I didn't find any way to submit similar structure to sharepoint list.


    Thursday, June 2, 2011 3:23 PM
  • Bit of a pain but if you estimate the maximum number of steps a user will enter, add these to your list (say 50 steps) and use conditional formatting in infopath to only show the next item if the previous item is populated with data.  You could use some javascript on the list view to hide any column not containing any data so you don't have a massive page full of empty columns.  Not the most elegant of solutions, but it may just help.

    See http://vanillacloud.com.s114622.gridserver.com/infopath/infopath-conditional-formatting-showhide-optional-section-via-checkbox-or-radio-buttons for an idea.

    Thanks.

    Keith.

    • Marked as answer by Wayne Fan Thursday, June 9, 2011 9:04 AM
    Thursday, June 2, 2011 3:50 PM
  • It sounds like you're describing a One to Many relationship, where a task has many steps, or a parent type has many instances of a child type. So I'd create both a Tasks lists and a Steps List. You can create the relationship by using a multi-value lookup column. CRUD can get kinda clunky in OOTB SharePoint, but InfoPath should make the experience of creating tasks and steps slicker.
    • Marked as answer by Wayne Fan Thursday, June 9, 2011 9:04 AM
    Thursday, June 2, 2011 3:54 PM