web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

SharePoint new item with different Created and Modified

(0) ShareShare
ReportReport
Posted on by 1,016

Hi everyone,

I have SharePoint list where I use a PowerApps form to create or update items in the list. When I create a new item, a Power Automate flow will be triggered. In that flow is being checked whether the item is new or modified, by doing next:

Capture.PNG

Now I have noticed that when a new item is created, many times it counts as modified, and not as new because Created and Modified have a difference of a few seconds. 

Example when a new item was created, I received next timestamps:

Created: 2020-10-06T20:51:54Z

Modified: 2020-10-06T20:51:59Z

-> Difference: 5 seconds

It should be the same. Someone knows why this is, or how to fix this? Can it have anything to do with the PowerApps form I use in SharePoint?

Help is very much appreciated. Thanks,

Ski

I have the same question (0)
  • Mira Ghaly Profile Picture
    11,413 Moderator on at
    Re: SharePoint new item with different Created and Modified

    @SkiDK 

    This comparison will not work you need to compare using the below expression instead

    formatdatetime(createdon,'dd/MM/yyyy') is equal to formatdatetime(modifiedon,'dd/MM/yyyy')

     

  • Verified answer
    SkiDK Profile Picture
    1,016 on at
    Re: SharePoint new item with different Created and Modified

    Hi @Mira_Ghaly 

    Thanks for your reply. In this case though, wouldn't I compare the days with each other? That window is a bit too wide. It can happen that someone wants to edit the item right after it was created.

     

    I have a temporary solution now, where I convert both dates to Ticks which I substract to get the difference and divide it by 10000000 to get the difference in seconds. If it is lower than 10 seconds, I count it as New, if higher as Update.

    (ticks(Created) - ticks(Modified)) / 10000000 < 10

     

    But I don't want to mark it as solution yet, because it's rather a workaround than the solution. I really would like to know why this occurs.

  • Verified answer
    Mira Ghaly Profile Picture
    11,413 Moderator on at
    Re: SharePoint new item with different Created and Modified

    @SkiDK 

    This solution you have suggested will work and makes sense.

     

  • mikeInTheCommun Profile Picture
    13 on at
    Re: SharePoint new item with different Created and Modified

    It is likely (if these times are a few seconds off) that you are creating the item via a Power App and you are patching some field  (like a concatenation of the item ID with some other information like FY) right after the item is created.

    If that is the case, you should run a flow only on item or file is modified, and use this check to see if the field you are concerned with has been changed (in my case, the FYID field):

    mikeInTheCommun_0-1720551051363.png

     

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 532 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 461 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 256

Last 30 days Overall leaderboard