Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

WHY update item replaced previous record

Need your kindness Help here,


Im working on ms flow for the Multiple user can trigger button clock in and clock out. The user which trigger the button will update the item in SPlist. however i find something wrong while trigger for Out which the item for previous record will be replaced. I just want it replaced on latest record / follow user record. My flow as below:



Level 8

Re: WHY update item replaced previous record



With the action get items, you will get all items of that list. If you then choose to apply to each to update the item, you will update the item x times for all items in the list. My advise is to first filter the list of the get items by date (today) and then check the user (I didn't figure out how to do this in the Odata query so My get items looks like this: 


Datum is the fieldname of the date field, and the formula is this: 

Datum eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'


2019-07-15 15_06_59-Edit your flow _ Microsoft Flow.png




Community Support Team
Community Support Team

Re: WHY update item replaced previous record

Hi @safuanAXO ,


If you want to update the latest record, you could refer to the configuration below.

Use Order by and Top Count to get the latest record, then update the item.



Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Powered On

Re: WHY update item replaced previous record

hi @v-bacao-msft 


I follow guide as u mentioned earlier, i put employee name as my Order field and Top count =1. The problem is when

Example Scenario:

Employee A clock in and Out - success update in sharepoint List ( IN and OUT column)

Employee B Clock in - Success update clock IN

Employee B Clock out - It will replaced clock out Employee A also. 


I wondering there is some function or method ive doing this wrong. please help and thanks for your kind reply




Super User
Super User

Re: WHY update item replaced previous record


I believe you can get this working if you add an OData filter to your existing configuration.  You need to retrieve only the records for the employee who is ckecking out.


The filter will look something like this:

EmployeeClaims eq 'Email of the person who clicked the button from Dynamic properties'


You'll need the single quotes.

OData filters usually use a columns internal name.  So, create a new flow and use get items to retireve items from the attendance list.  Run the flow and ckeck to output of the Get items action.  You'll need to refer to the Employee claims column in exactly the same way as it shouws in the output.

You'll still want Order By ID Desc and Top count of 1







If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Level: Powered On

Re: WHY update item replaced previous record

hi @ScottShearer ,


ive try your solution on this. but no output in sharepoint. can u advise on this ? Thanks for your feedback






Level: Powered On

Re: WHY update item replaced previous record

Helpful resources


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,118)