Lists Lookup Column - Odd behaviour

Copper Contributor

I have two sets of two lists set up. They are identical in everyway (the second set were actually generated from the first set).

 

1st Set
SOURCE List Source1List ALL relevant columns in it are Single line Text columns.

TARGET list Target1List has one lookup column with 3 other columns form SOURCE List selected to show.

 

All columns display values as expected, with the 3 columns picking up the values from the Source list as expected.

2nd Set

SOURCE List Source2List ALL relevant columns in it are Single line Text columns.

TARGET list Target2List has one lookup column with 3 other columns form SOURCE List selected to show.

None of the displayed values in the 3 source columns show values.

I have checked the setting in all lists regarding the Lookup columns and checked all columns being referenced are single line text only.

I am at a loss to know why one set is not working correctly. Can anyone shed any light?

For reference I show the two Target list outputs below.

TargetList1 - Output

Screenshot 2023-06-23 at 16.50.25.png

TargetList2 - Output

Screenshot 2023-06-23 at 16.52.42.png

This has been driving me nuts for a couple of hours. What is going on here?

Anyone help?

 

Thanks,

 

c.

2 Replies

Hi @chris_chad,

what mechanism did you use exactly to copy the lists and how did you "re-map" the lookup column from Source1List  to Source2List (if this was needed) ?
Did you just create a new list and did you then select "From existing list", or did you use something like a provisioning template?

What happens if you re-create the lookup column on the "Target2List"? Does that work?

Sometimes you can end up with a lookup column that points to a list or a field that does not exist (Or to a field that has the same name, but a different id).

You can check the field definitions of the lookup fields if you go to the url

https://<yourtenant>.sharepoint.com/sites/<YourSite>/_api/web/lists/getbyTitle('<List Title>')/fields?$filter=Title eq '<FieldName>'

You get the definition for the "LookupField" (the field in the lookup list to display in the dropdown), the "LookupList" (The internal ID of that list) and the "DependentLookupInternalNames" (The other fields you want to display from the lookup list). 
I suspect that the names of the fields in the DependentLookupInternalNames are the same on both lookup fields, but the internal names of these fields differ in your Source1List  and Source2List. So the second lookup tries to display fields that do not exist on the second source list.

Best Regards,
Sven


I created the lists, as you suggest, by creating a new list from an existing list. This created the 2nd set (from the 1st set) but without data in the new set. I was impressed that the look up field headings all appeared correctly and I checked that the settings for each column in each list matched which they did exactly. I then ran a manual flow to populate both target lists with the data from the source lists and (having had to modify the default 100 limit for the flow) both sets of data were migrated correctly, with only the 2nd set not showing the lookup column values. All other column (non lookup column) values show correctly. Which indicates the data is there correctly.

I will check the URLs to see if the field definitions you mention are pointing correctly.

Once I have the data displaying correctly to then have a flow which updates the second set from the first set when items are created or modified. Effectively having a ‘view only’ copy of the source list info for reference by external company collaborators ( via a restricted SharePoint page).

All this because the original lists are in a site different than the one where the target lists will sit.

Will let you know about the url definitions.

Thank you.

C.