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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to differentiate c...
Power Automate
Answered

How to differentiate created and modified trigger in MS Flow?

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

As everyone suggested, I check 'Created' eq 'Modified' to differentiate created and modified trigger, it is working only if the SP list item does not have an attachment. When the user adds an attachment to the list during item creation, created and modified time is not the same. 1-sec difference occurred Created:2020-08-05T22:43:45Z and Modified: 2020-08-05T22:43:46Z. Thoroughly checked many times. Now, How to differentiate created and modified trigger in MS Flow when there is an attachment in the SP list.

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @samtim 

     

    You need to enable the version settings of your list.

     

    image.png

     

    Next in your flow you can get the version number to determine whether it create or modify. For create version number is 1.0

     

    image.png

  • Verified answer
    v-alzhan-msft Profile Picture
    on at

    Hi @samtim ,

     

    You could check the if created is greater than the modified-10 second, if yes, that means the item is new created, if not, it means the item is modified.

    1.png

    addSeconds(items('Apply_to_each')?['Modified'],10)

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • samtim Profile Picture
    8 on at

    HI @abm , Thanks for the response. It didnt work because version no become 2 when flow triggered first time

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @samtim 

     

    That's because the attachment treats as a modified operation.  

     

    Could of options.

     

    1. Treat version 2 as create but then you must always have an attachment when it creates the list record.

    2. Check for version 1 then it's always create. so in this case no attachments.

    3. Add few more seconds to created time and compare if its less than 10 seconds or so then create.

     

    Thanks

  • v-alzhan-msft Profile Picture
    on at

    Hi @samtim ,

     

    Have you take a try with my solution?

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • MWAN001 Profile Picture
    23 on at

    Alice, it seems to work. 

    Pls help with two questions: 

     

    1. Why if created is greater than the modified-10 second, that means the item is new created?  

    2. addSeconds should be -10, instead of 10? 

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

Forum hierarchy changes are complete!

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard