Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Error with SharePoint move file action

(0) ShareShare
ReportReport
Posted on by 9

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.  

MY_0-1600392933159.png

 

MY_0-1600393154396.png

 

 

What would be causing the error?

  • sudharsan1985 Profile Picture
    1,325 on at
    Re: Error with SharePoint move file action

    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.

     

    sudharsan1985_0-1600515586580.png

     

    Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
    -Sudharsan K...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow