locked
Relating Parent -> Child Sharepoint lists RRS feed

  • Question

  • Hi

    I have a need to create a small list of projects where each project in this list will relate to another list of activities. This is a typical parent (project) to child (activity) database relationship.

    1. Within the Sharepoint environment, I know you can insert the ID of a parent list record into a record of a child list using workflows, but how do I do this when a user enters a record in the child table? How do I know systemcially which parent project  record the new child activity record should point to?

    2. I would like to display the separate project and activity lists on one Sharepoint page. Assuming #1 can be done, is there a way to select a given project record and only display the acitivity records that are associated with it?

    3. Using a field that is defined as a 'lookup', is there a way to filter the values that appear in the drop down based on some qualifier? For example, suppose I am looking up years, is there a way to filter the lookup so it only displays recent years (i.e. 2006, 2007, 2008....)?

    Paul

     

     

    only display the activities that are associated with a given project

     

    which pathe Sharepoint interface

    Wednesday, October 5, 2011 11:54 AM

Answers

  • hi

    > 1. Within the Sharepoint environment, I know you can insert the ID of a parent list record into a record of a child list using workflows, but how do I do this when a user enters a record in the child table? How do I know systemcially which parent project  record the new child activity record should point to?

    the most straightforward scenario is to use lookup field. I think users who addes new activity into the list should know to what project it belongs to. When you create lookup field you should select what field from lookup list should be shown in the child list. If you select readable user friendly project name - users will easily identify it. It is unclear why do you need workflow here.

    > 2. I would like to display the separate project and activity lists on one Sharepoint page. Assuming #1 can be done, is there a way to select a given project record and only display the acitivity records that are associated with it?

    yes it possible with OTB data view web part (check e.g. this post: Firing an Event When a User Selects a Value from a Data View Web Part Dropdown) or using custom web part.

    > 3. Using a field that is defined as a 'lookup', is there a way to filter the values that appear in the drop down based on some qualifier? For example, suppose I am looking up years, is there a way to filter the lookup so it only displays recent years (i.e. 2006, 2007, 2008....)?

    with OTB field controls it is not possible.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com
    Wednesday, October 5, 2011 6:52 PM