
Today I had some issues with a Lookup Column in SP2010.
When using my Admin account I was able to edit an Item and select a value. When using my normal useraccount (with contribute rights on bot lookuplist an list) I wasn't able to select anything, and SP2010 showed an empty dropdown.
Looking at the column properties in SharePoint everything looked OK, but using SP Designer the properties where empty.
Figuring this just might be something other then a rights issue, I wrote a little PowerShell function to check the settings of my Column.
Function Check-LookupColumn($webURL, $listName, $columnName, $lookupListName)
{
$web = Get-SPWeb $webURL
$list = $web.Lists[$listName]
$column = $list.Fields[$columnName]
$lookupList = $web.Lists[$lookupListName]
write-host "lookupweb : " $column.LookupWebId.ToString()
write-host "should be equal to web : " $web.ID.ToString()
write-host "lookuplist : " $column.LookupList.ToString()
write-host "should be equal to list: " $lookupList.ID.ToString()
}
Turned out that during the migration from one environment to the other, the references of the lookup column had not been updated.
The Admin account had sufficient rights on both environments, so it worked for that account. my user account on the other hand was not available in the source environment, so no sigar.
After updating the column with the right GUID's everything works again.
Wish I had seen this before writing my onw script
, but the script to fix the lookup column can be found at: http://get-spscripts.com/2011/01/fixing-blank-lookup-columns-in.html
618aad08-2143-47af-9a7b-4cd59e406b0c|0|.0