0

As you can see in the picture below, initally, I am using the trigger 'When file is created or modified (properties only)". I need a condition to tell whether a file is being created up merely updated. If it is new, then it will use the 'Yes' section and create a new item. If a file is just being modified, then it will update the list item. But, I do not know how to set up the condition to do this?

Thanks!

enter image description here

2 Answers 2

4

Would Created != Modified work? Something like this:

@not(equals(triggerBody()?['Created'], triggerBody()?['Modified']))

"Yes" in this scenario would be modified (its a not). You can just adjust accordingly.

1
  • This did not work, nor did reversing the logic.
    – Coder
    Dec 22, 2017 at 19:44
0

In my SharePoint online environment, I can select “When a new file is added in SharePoint, complete the custom action”. Then you can trigger the flow only when a file is created. enter image description here

enter image description here

You also could create workflow for the document library to trigger your actions in SharePoint designer 2013. You could create two workflows. One workflow can be triggered when a file is created. And the other workflow can be triggered when a file is updated.

In the workflow settings, in the start options, you can select “Start workflow automatically when an item is created” in one workflow. Then the workflow will be triggered when a file is created.

And you can select “Start workflow automatically when an item is changed” in the other workflow.

The two workflows will be triggered by different conditions.

enter image description here More reference:

Creating a workflow by using SharePoint Designer 2013 and the SharePoint Workflow platform.

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/creating-a-workflow-by-using-sharepoint-designer-and-the-sharepoint-wo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.