I've got a projects list in SharePoint 2013 that connects to two document libraries by way of a lookup column. Each document set in the libraries should ideally have its lookup column pointing to a valid project in the list. This system has been in use for a while now, however, and I'm finding that it needs to be cleaned up somewhat. Some libraries don't have a project assigned, while others are pointing to projects that have been deleted.
I attempted to turn on the cascade delete feature for the lookup column, but I'm getting an error that states one or more rows points to an invalid value. The specific error is below.
This lookup column cannot enforce a relationship behavior because it contains values that reference one ore more non-existent items in the target list.
This is apparently referring to the ones that point to a project no longer in the list. My list has about 5000 projects in it, though, with each project having two libraries. Is there an easy (or even semi-easy) way to identify these orphaned lookup connections, or do I have to go through all 10000+ document sets manually?