2

I have 2 Sharepoint Lists:

Entidades:

Entidade_ID | Nome
1           | ABC
2           | DEF

And Diario:

Diario_ID   |  Entidade_FK
1           |  2
2           |  1
3           |  2

I want to add a lookup column to Diario to get the Nome of Entidades.

In SharePoint, this is what I'm doing:

enter image description here

Get information from "Entidades" and return NomeCurto (the name).

But where does the Foreign Key go!?

This operation adds a column to Entidades but an empty one, because the foreign key isn't anywhere!

I hope this makes sense and someone can help, I've read the whole documentation, but it isn't there either.

Thank you!

EDIT:

I tried also the following setting:

enter image description here

enter image description here

But this also returns an empty column.

I think it is because the target list has other foreign keys which now contain little red icons...

3

I made a simple demo for you.

First this is the list Entidades: enter image description here Then create the list Diario: enter image description here Then create a lookup column Entidade_FK, make sure Get information form Entidade, the selected column is Entidade_ID and check the Nome:

enter image description here

At last: enter image description here If you don't want to display the column Entidade_FK, you can choose to hide it, just go to List Settings>View>Your current view,and uncheck the Entidade_FK column: enter image description here enter image description here Finally: enter image description here

1
1

When you want to use a lookup column in SharePoint, you don't need to build a lookup key manually. SharePoint takes care of that.

You just select which list you want to use as the source for the lookup column and which column of that list should be used for the visible data drop-down. SharePoint then takes care of the lookup architecture and internally uses the built-in list item ID as the key.

So, just select which column you want as the main lookup value, and, if you want, also add other columns from the lookup list, to supplement the value that was looked up.

2
  • If that resolved your issue, please mark the answer as described in the tour. If it didn't, please leave a comment, so I can follow up. – teylyn Dec 22 '20 at 19:48
  • Thank you, please see my edited question above. – Delete my account Dec 22 '20 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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