cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dave8
Impactful Individual
Impactful Individual

When new item is created/modified in SharePoint list, how to identify the action in the flow?

Hi,

 

I assume earlier there was an option to control the operation create/modified, while now I do not see the same in the connector.

 

can you please help - How can I identify that item is  created/modified in the flow? 

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
dave8
Impactful Individual
Impactful Individual

Thank you @Expiscornovus  to clarify it further, It helped and worked for me to identify created/modified operation in the condition in the flow as identifying it via trigger condition was not my objective:

 

dave8_0-1621576454459.png

 

Thank you for your help!

 

View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @dave8,

 

A workaround could be to add a condition or a trigger condition to your flow. You could compare the created and modified datetime values. If they are the same it is a newly created item. If they are different it is a modified item.

 

Below is an example of a trigger condition for Created items.

@equals(triggerOutputs()?['body/Modified'],triggerOutputs()?['body/Created'])

 createditem_expression.png

 

Modified items expression would be:

@not(equals(triggerOutputs()?['body/Modified'],triggerOutputs()?['body/Created']))

 

dave8
Impactful Individual
Impactful Individual

Thank you @Expiscornovus , However I observe as follows:

 

@equals(triggerOutputs()?['body/Modified'],triggerOutputs()?['body/Created'])

 

1. Above trigger condition triggers whenever the item is created and modified - so it's not helpful.
2. Value of "triggerOutputs()?['body/Modified']" is always blank whether I create/update item, so I can not check in the flow.
3. Following Trigger condition does not trigger the flow at all


@not(equals(triggerOutputs()?['body/Modified'],triggerOutputs()?['body/Created']))

 

Any clue?

 

Thanks,

Expiscornovus
Super User
Super User

Hi @dave8,

 

Can you share a couple of screenshots of your flow setup and your tests? I might need to adapt my example to your situation. 

 

Btw, to clarify the approach a bit more. I am simply comparing the two date time values with an equals function. When the outcome of this equals function is true it should only trigger the flow. 

 

Below is the raw output of a random created item in a SharePoint list. As you can see the created and modified date time values are exactly the same.

"body":{
"@odata.etag":"\"1\"","
ItemInternalId":"2",
"ID":2,
"Title":"3",
"Modified":"2021-05-20T11:17:11Z",
"Created":"2021-05-20T11:17:11Z",
}

 

And this an example of the raw output of a random modified list item. Over here the modified and created values are different.

"body":{
"@odata.etag":"\"5\"",
"ItemInternalId":"1",
"ID":1,
"Title":"2",
"Modified":"2021-05-20T11:16:32Z",
"Created":"2021-05-13T10:05:12Z"
}

 

dave8
Impactful Individual
Impactful Individual

Thank you @Expiscornovus  to clarify it further, It helped and worked for me to identify created/modified operation in the condition in the flow as identifying it via trigger condition was not my objective:

 

dave8_0-1621576454459.png

 

Thank you for your help!

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,269)