Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Update of SharePoint Field 1

Status
Not open for further replies.

lday

MIS
May 19, 2009
9
GB
Hi,

I have been working with WSS 3.0 for about a year now but havent really done much in terms of customisation but am needing to start doing so. I am a keen person with a big interest in programming but need a little nudge in the right direction on something I am trying to do, which is as follows:

I have an employees list where employee details are stored. Each employee is linked to a department (which is a lookup field to a department list).

I then have another list where I want the user to be able to use a lookup field and select the employee (from the employees list). However, in this list I also have a department lookup field. When an employee is selected I would like the department to be automatically selected for the user to the same value as the department field in the employee list.

I cannot do this with workflow as it need the field to be set as soon as an employee is selected so the user can see it straight away. However it needs to remain a lookup field as department may require to be changed from that of the employee that is set as default. I hope that all makes sense.

If anyone can point me in the correct direction I would be most grateful! Cheers
 
Without going into the nuts and bolts, if you want the department to update as soon as the empoyee is selected you're probably going to need a custom field type - might be quite complicated. Are you wanting to be able to change the department afterwards?

If you're happy that the department updates when the user saves the list item then you could implement an event listener on the list which deals with insert and updates.
 
Thanks for that niceguymattx,

I am just wanting the value to be displayed, it doesn't necessarily have to be a drop down field that can then be changed. Would this make it easier?

The only big requirement is that when the employee is selected i need it to show the value straight away (or refresh the page and it be there) and not have to wait for the user to save the item and then go back into it.

Any further pointers/ideas?

Cheers
 
Cheers for that, on the surface it looks what i am after. I will look into it in more detail when i am next working on that project.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top