I have an attendance sheet that is set up like this:
This feeds into a Power BI visualization where the visualization breaks out the dates between start and end dates. I also have a flow that can break up the dates between the start and end dates as well, but have them turned off at the moment.
The flow I'm having trouble creating should check if the item that's being created or modified matches the start date and name of something already in the list. If it matches, it will delete the old instance (duplicate).
I want to do this since people make mistakes inputting their attendance and can influence the data in the Power BI visualization. Is there a way to do this in Power Automate? Modified and Modified by are metadata columns.
Hi @jakefromstfarm ,
Below I followed @Chriddle reminder to modify the flow:
My SharePoint List:
In Filter Query, we need to use the internal name of the column to filter.
When there are special characters such as spaces, '_', '/' and other special characters in the column name, the display name will be different from the internal name, then we need to jump to the edit interface of the list to view the internal name of the column.
Here are the steps to see the internal name of the start date.
My Flow:
Title eq '@{triggerOutputs()?['body/Title']}' and internalname eq '@{triggerOutputs()?['body/internalname']}' and Created lt '@{triggerOutputs()?['body/Created']}'
Best Regards,
Sunshine Gu
Hi @Chriddle ,
I know what you mean, thank you for the reminde.
However, in order to avoid using the internal name of Start Date in OData Filter, so that users do not need to look at the internal column names.
Best Regards,
Sunshine Gu
Don't iterate all items. First, filter for items you want to delete.
Hi @jakefromstfarm ,
@Rhiassuring One of his logical mistakes is that he would delete the newly created item and the original item at the same time.
I recommend that you add 'Title' equals 'Title' and 'Start Date' equals 'Start Date', and then add that the created time of the item that meets these two conditions is less than the created time of the new item, so as to avoid the situation that the newly created item and the original item are deleted at the same time.
I did a test for your reference.
In my scenario:
Best Regards,
Sunshine Gu
Hi there,
So what you'll want to do is on Creation / Modification (trigger), use a "Get Items", and a Filter Query of Title eq 'XXXX' and Start Date eq 'XXXXX' [ where the XXXX is dynamic content from your trigger pointing to the same piece of data.]
Then you can use a Condition. The condition will be length() where inside of the () you'll point to the body output from your Get Items. If the length is 0, then no duplicate found. If the length is NOT 0, then you'll have found a duplicate and can delete it.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1