Question

So I had to make a Sharepoint site to inventorize our servers. I have two types of lists (replicated a few times per group, but for this, just consider two lists), one lists servers and has a column 'NICs' which does a lookup on the other list, which lists NICs.

The NICs list has a column 'Server' which does a lookup from the Serverlist. A server can also have multiple NICs, but a NIC can only get assigned to one server. I suppose setting the niclists 'server'-column to be unique covers this aspect?

Say I have some items in my NIC-list, 'nic1', 'nic2', 'nic3'. If I add a serveritem to the serverlist and I add 'nic1' and 'nic2' to its nic-lookupcolumn, how can I have sharepoint automatically add this new serveritem to 'nic1' and 'nic2''s server-lookupcolumn?

I have investigated workflows, but I haven't found a way to do this via sharepoint itself. All solutions I find suggest coding in ASP.net, but I have no experience with it.

(On a separate note, how do I remove the Server-column from the form for a new nic-item?)

Was it helpful?

Solution

You can use SharePoint Workflows for this one. All you need to have is SharePoint Designer. There is a specific action called Update List Item which allows you to update any list using your workflow or Create List Item to create items on a different list. You just need to properly setup the lists and workflows you will be using. You can follow the general rule below:

  • If you are updating a list, make sure the child list (or the list you will be updating based from another list's value) has a unique reference from your parent list.

  • Use the Update List Item or Create List Item action when an item is added in a list to make sure the workflow is properly triggered.

And since lookups are typically just lists used as a column on another list the same principles above apply when creating the workflow.

For more details on how to use the said workflow action you can go and visit this link and this link.

OTHER TIPS

you could easily do this using sharepoint designer workflows, you could create a workflow to list a and then in the workflow itself, update/create a new list item for the other list.

You can do this by using EventReceiver. It is pretty easy to code in visual studio. http://msdn.microsoft.com/en-us/library/gg749858%28v=office.14%29.aspx

you can use item creation/update event.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top