Forum Discussion
Lists Lookup Column - Odd behaviour
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
- chris_chadJun 24, 2023Copper ContributorI 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.