Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have 2 lists:

Users

Notes

Notes has a lookup field that links it to Users (ContactName)

I have added a Notes WebPart to User's Edit Item screen. Now when you edit a user, it shows a list of notes where their name is linked, and an 'Add new item' button.

When I click 'Add new item', the 'Notes - New Items' popup appears. One of the fields on the form is 'ContactName', a dropdown list of Users.

Considering I am currently editing a User, I would expect that user to be pre-selected in the dropdown list. However it is not.

Can anyone explain why it is not pre-selected, and how I can change it to pre-select the current user.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

I've found exactly what I was after here. I followed the tutorial and everything works great.

http://geekswithblogs.net/SoYouKnow/archive/2010/12/16/creating-a-sharepoint-parentchild-list-relationshipndash-sharepoint-2010-edition.aspx

share|improve this answer

To accomplish that, you'd need to have some code that dynamically sends a query string prameter over to the newform page of the Notes list. The newform page would have some code on it that parses the query string and sets the desired drop down list value depending on who the user is.

Typically those associations have to be built, SharePoint doesn't do that for you, as obvious as that may appear when using other web sites. You could use jQuery and SPServices to handle some of this, SPServices has a dead simple to use query string parameter parser in it.

share|improve this answer
    
So I can use jQuery to get the current item's ContactName somehow (not sure yet), append it to the QS of the 'Add new item' link, and then retrieve it on the New Item page, and pre-select the name from the dropdown. I'll see how it goes. Thanks –  Jamie Carruthers Jul 26 '11 at 9:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.