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

Can't determine created vs modified?

Hi all,

 

I am using a flow to post a message to a Teams channel when a file is created, and the same thing if a file is modified. However, I want to be able to differentiate between the two. For example:

 

If a file is created:

A file has been created by [Name]: [FileName.ext]

 

If a file is modified:

[FileName.ext] has been modified by [Name].

 

This is my flow right now:

 

Capture.PNG

 

And it is not working. I am getting "[FileName.ext] has been modified by [Name]." every time, even if the file was created. Any ideas why this is not working?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Can't determine created vs modified?

Hi @rad ,

 

The logic of your Flow configuration is no problem.

I did a test on my side. If you create a file directly in SharePoint, since O365 has an AutoSave mechanism, after you create the file, Flow will consider this to be the changed file.

You could try to upload the file so that the judgment result is true.

57.PNG

 

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.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Can't determine created vs modified?

You could use parallel conditions, one for the Created and one for the Modified. You can compare those times to be greater than or equal to the utcNow() expression, like so:

ParallelConditionsCreatedModified.PNG

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support Team
Community Support Team

Re: Can't determine created vs modified?

Hi @rad ,

 

The logic of your Flow configuration is no problem.

I did a test on my side. If you create a file directly in SharePoint, since O365 has an AutoSave mechanism, after you create the file, Flow will consider this to be the changed file.

You could try to upload the file so that the judgment result is true.

57.PNG

 

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.

View solution in original post

Highlighted
rad
Level: Powered On

Re: Can't determine created vs modified?

@v-bacao-msft 

 

Looks like that worked, thank you. Creating and modifying a file in SharePoint directly gives me the result I want, but if I do it from Teams (ex. go into my team's "Files" page and upload something) I do not get the results I want, not sure if there is a way to correct that...

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Users Online
Currently online: 81 members 3,376 guests
Please welcome our newest community members: