Domanda

I have 2 SharePoint lists. I have List A which is list of types of devices (make, model, etc.) and List B which contains an inventory (serial number, computer names, ip address, etc.) List B has a lookup column to reference model types from List A, but how can I copy the other relevant data such as make and device type? I've already set up a workflow to copy the lookup value to a new column, but how can I get the rest of the data from the other list?

È stato utile?

Soluzione

Because your original question is about how to copy data from another list based on a lookup column, that is what I'm answering, however I had the same initial reaction as Hartraft. Namely, that there's an easier way to just display additional information from an item selected in a lookup column from one list into another list. (Hence my question in the comments asking for clarification.) But again, here is the answer to your actual question as stated:


A lookup column, behind the scenes, actually stores the item ID of the item in the lookup list, along with some extra information to say which column from the item in the other list to show data from.

In your case, your lookup column in List B is showing data from the Model column in List A, but the way it finds that data is that it's actually storing the list item ID of the item in List A to get that data from.

This means you can use that ID in a workflow to find the same item and get other column values from it.

Let's say, as you mention, you want to copy the Device Type value from the item in List A that was chosen in the Model lookup column in List B into another column in List B. (And assuming your workflow is running on an item in List B.)

You would choose a step to "Set Field in Current Item", choose your "Device Type" column in List B, but in the dialog that opens to choose where the data is coming from, for the data source, you choose List A, and then for the "field from source" you choose the "Device Type" column from List A.

Then in the lower section where it says "Find the List Item", you specify that you want to find the item in List A by the ID, and the value of that ID is the lookup value of your Model lookup column in the current item in List B:

screenshot of workflow dialogs

You could use similar steps to set the values of other columns in List B to the values of other columns in List A from the item selected in the Model (lookup) column by using the Lookup ID to find that item in List A.

However, if you don't actually have a reason you need to copy that data over, there is an easier way to just show the data from List A in List B.

If you go into the column settings for the lookup column in List B that is set to show the Model data, you can choose to also show data from additional columns from List A:

lookup column settings

Altri suggerimenti

You should be able to simply show the other columns of information through the lookup column that you have added on to List B.

If you go in to edit the column you should see a section that says "Add a column to show each of these additional fields:"

Select the columns you require and they should be added as additional columns.

enter image description here

If you want this for display purposes you can modify the list view on List B to show lookup columns. Lookup columns will look like this:

LookupColumnName:FieldNameOnListA

However you need to ensure that all fields are selected in the picture @Hartraft posted. enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top