locked
Content Types, Site Columns, Custom Lists Conundrum RRS feed

  • Question

  • Hi All,

     

    I seem to have got myself into a bit of a twist when it comes to content types and site columns.  What I am trying to do and I hope this makes sense:

    • Create a Custom List to hold all the Buildings where our teams work
    • Have people add, edit and update the buildings list - managed with workflows.
    • Get a series of drop down lists that appear on a page layout where people can choose the building they work in
    • Work it so that when someone adds to the Buildings list, the added entry becomes available on the page layout

    What I've done so far:

    • Created the Building Name as a Site Column and add it to a page content type
    • Added that site column to a list and to a page layout and added information to both

    What I can't get is the values of the custom list updating the drop down list on the page layout.  Is this even possible?  Could I do it through the workflow - update site column values?  Am I even approaching this the right way?  Does what I need require a bit of code?

     

    I'm not even sure I fully grasp how site columns and content types work.  I've been having a think about this for a little while and it's starting to give me brain ache.

     

    Mike 

    Tuesday, June 24, 2008 3:34 PM

Answers


  • Hi Mike,

    Not sure if I know what exactly you are trying to achieve. It seems that you wanted to have a Site Column that carries out a lookup on a List of building that your teams work in? Is this correct?

    The fact that you have it on the page Layout, I am not sure what you want it there for?

    The way that I would have approached this would create a custom List called Buildings. As I am sure that the buildings dont change that often. This list will be used for a source of a LookUp.

    Then on the second custom List where you will be storing the Team Details and building, you will need to add either a site column directly to the list, or you can add it to a new content type Named "Team Location" for example. You then can add that Site Content Type as a content type to be used in the list. (Advanced Settings of the List).

    The site column that you need to created is called a lookup site column. Then you can point it to the Buildings list that you created as the source of the items in the dropdown list - all of this is done through the new Site Column UI. Make sure that the Column is being created in the same site that the Builds list was created. Else you will need to write a custom cross site lookup field.

    On the page where you might want users to filter the views by selecting a building, you can either create a View on the team Locationl where you sort/group by the Building field. Alternatively you can put a List Web Part on a Page and also a List Web part of the Team Locations on the page and use the SharePoint web part connections to link the two. So if a user selects one of the buildings, it will refresh the screen (List WebPart of the Team Locations) with the selected Value.

    These is however a third option. You can put a a control on a Page that is a dropdown that's sourse is a SPdataSource Control and modifiy the CAML to query the Buildings List and Bind it to the drop down control. You can add some Client Script to the Selected index changed where it sends a Parameter in the Query String to a page where you created a DataView Web Part that uses a filter from the QueryString of the Page and displays the List Items of the Team Location List filtered by that value.

    Hope this helps...

    Regards
    John
    Tuesday, June 24, 2008 4:28 PM

All replies


  • Hi Mike,

    Not sure if I know what exactly you are trying to achieve. It seems that you wanted to have a Site Column that carries out a lookup on a List of building that your teams work in? Is this correct?

    The fact that you have it on the page Layout, I am not sure what you want it there for?

    The way that I would have approached this would create a custom List called Buildings. As I am sure that the buildings dont change that often. This list will be used for a source of a LookUp.

    Then on the second custom List where you will be storing the Team Details and building, you will need to add either a site column directly to the list, or you can add it to a new content type Named "Team Location" for example. You then can add that Site Content Type as a content type to be used in the list. (Advanced Settings of the List).

    The site column that you need to created is called a lookup site column. Then you can point it to the Buildings list that you created as the source of the items in the dropdown list - all of this is done through the new Site Column UI. Make sure that the Column is being created in the same site that the Builds list was created. Else you will need to write a custom cross site lookup field.

    On the page where you might want users to filter the views by selecting a building, you can either create a View on the team Locationl where you sort/group by the Building field. Alternatively you can put a List Web Part on a Page and also a List Web part of the Team Locations on the page and use the SharePoint web part connections to link the two. So if a user selects one of the buildings, it will refresh the screen (List WebPart of the Team Locations) with the selected Value.

    These is however a third option. You can put a a control on a Page that is a dropdown that's sourse is a SPdataSource Control and modifiy the CAML to query the Buildings List and Bind it to the drop down control. You can add some Client Script to the Selected index changed where it sends a Parameter in the Query String to a page where you created a DataView Web Part that uses a filter from the QueryString of the Page and displays the List Items of the Team Location List filtered by that value.

    Hope this helps...

    Regards
    John
    Tuesday, June 24, 2008 4:28 PM
  •  

    Cheers John,

     

    I like the sound of option 3 myself, that seems to make the most sense.

     

    The reason I wanted to embed it into a page layout was so that on each team or project site, they could select a building and then using the CQWP we could get a linked list by building.

     

    Mike

    Wednesday, June 25, 2008 2:30 PM