We are getting this error with one of our flows that moves a SharePoint File to another document library.
This constraint cannot be enabled as not all values have corresponding parent values. CallStack -- at System.Data.ConstraintCollection.AddForeignKeyConstraint(ForeignKeyConstraint constraint)
at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign)
at System.Data.DataRelationCollection.DataSetRelationCollection.AddCore(DataRelation relation)
at System.Data.DataRelationCollection.Add(DataRelation relation)
at System.Data.DataRelationCollection.Add(String name, DataColumn parentColumn, DataColumn childColumn)
at Microsoft.SharePoint.Deployment.ListItemObjectHelper.ProcessQueryResult(SqlDataReader reader)
at Microsoft.SharePoint.Deployment.ListItemObjectHelper.GetNextBatchV2()
at Microsoft.SharePoint.Deployment.ObjectHelper.RetrieveDataFromDatabase(ExportObject exportObject)
at Microsoft.SharePoint.Deployment.ListItemObjectHelper.RetrieveData(ExportObject exportObject)
at Microsoft.SharePoint.Deployment.ExportObjectManager.ExportListItemObjects(Boolean isRootObject)
at Microsoft.SharePoint.Deployment.ExportObjectManager.GetRootObjectBatchOnType(SPObjectType objectType)
at Microsoft.SharePoint.Deployment.ExportObjectManager.GetNextExportObjectBatchForRootObjects()
at Microsoft.SharePoint.Deployment.ExportObjectManager.MoveNext()
at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects()
at Microsoft.SharePoint.Deployment.SPExport.Run()
clientRequestId: 4ae1833b-a7e5-408e-8e2c-96a36de9aa9a
serviceRequestId: 4ae1833b-a7e5-408e-8e2c-96a36de9aa9a
The flow uses the When an item or a file is modified trigger and Get changes for an item or a file (properties only) to check for column changes.
What would be causing the error?
Hi @MY
I tried the below actions with the different values for the 'File to Move' property in the 'Move File' action. I used 'Full Path' from the triggerOutput instead of 'Identifier'. Please try it out. Remember to add the condition for 'Checked-out' documents. If your document library is enabled with check-in and check-out functionality, you have to check whether the files are checked-in or not then you have to move the file. You can also use the 'Checkout' value in the trigger condition so that the flow will trigger only when the file is checked in.
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional