DataServices Entity Data Issue

I am facing an issue while I’m trying to insert data into entities… i.e, I have created a use case with a template to read data from excel sheet and insert those records into entities created on DataServices. so while Rerun of the scripts data is being appended. so multiple records are being created i.e, Duplicate values. Can any one please guide me on how can I avoid Duplicate Records ?

Hi @Hyndavi_Nelluri - The best way to achieve this is to first check if the Student with StudentID already exists with a Query Records activity and if the count of results is higher than 1, then select it and update it. If the StudentId doesn’t exist, then create a new one.

Here is what a sample workflow may look like -

The “Then” workflow is the update flow and “Else” workflow" is the create flow in the above workflow.