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

Re: Flow: Existing item is modified triggers when a new item is created in Sharepoint list

Hi, 

Are you finding that the flow works reliably? 

I am finding that the condition Created = Modified sometimes triggers as 'false' because the times appear to be 1 second apart for newly created items:

 

Capture.JPG

Blouwagie2
Level: Powered On

Re: Flow: Existing item is modified triggers when a new item is created in Sharepoint list

Hi,

I have an idea, I tried it, and it works, when an item is created it is version 1.0,

For that to work you need to go to List settings, versioning. You can turn this on for any list.

An updated list item has a version that is bigger than 1 and in your condition you can just use that. In my trials it:  Control (int(triggerBody()?['{VersionNumber}']) equals 1)

 works a better than:  Switch (@equals(triggerBody()?['Created'], triggerBody()?['Modified']).

 

JimmyWork
Level 8

Re: Flow: Existing item is modified triggers when a new item is created in Sharepoint list

@Blouwagie2 This was really helpful, thank you very much

gazzo1967
Level 8

Re: Flow: Existing item is modified triggers when a new item is created in Sharepoint list

@Blouwagie2 

Could ypu post image of flow?

It would show how to build the control 🙂

 

Gary

JimmyWork
Level 8

Re: Flow: Existing item is modified triggers when a new item is created in Sharepoint list

@gazzo1967 

 

Create a condition

First conditon type expression: int(triggerBody()?['{VersionNumber}'])

is equal to

1

 

now this is all thanks @Blouwagie2 flow.png

Highlighted
DanielaHo
Level: Powered On

Re: Flow: Existing item is modified triggers when a new item is created in Sharepoint list

Great suggestion - just tested and it works well! Thank you Smiley Happy

Just adding to this, it only works when version control on the list is enabled, else the item will stay version number 1 even when it is edited: 

Capture1.PNG

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 402 members 6,728 guests
Please welcome our newest community members: