I am new here and hope to be able to learn and get some support
I am also new to SharePoint / Nintex and would ask for your patients.
Right, here we go...
I like to create a workflow to send an email out to certain users only when:
What I have done so far is, created a Document List with its categories and set up a filter as seen below:
I also created the workflow as following:
1st Condition (top)
2nd Condition (left branch)
Its purpose is to check if the uploaded file is NOT the same as other documents!
Hint: just noticed it should be "is not equal" but yeh ... I changed that in meantime and yet not working!
3rd Condition (right branch)
... this is a pain this!
The issue with the uploaded files is that the Uploaded on and Updated on - are only the same when
the user manages to upload the file within a minute ... otherwise there always be a time difference.
I am stuck how to get around this and driving me insane.
Probably, I am over-complicating it myself and it may be just a case of an easier solution.
Would be thankful if you can help me out
Solved! Go to Solution.
I would recommend to create two seperate workflows.
1. Workflow "a new document has been added to a specific category"
Conclusion: This worklfow will run only once when an item is added and send your notification informing about the newly added item.
2. Workflow "an existing document within specific category has been modified/changed/updated."
Conclusion: This workflow will run every time the item is being updated. But if the "itemUpdated" event occurs for the first time (which it does when you uploaded the item for the first time) the workflow won't do anything.
==> Both workflows will always start when an item is being added/updated. But only the correct workflow will perform something while the other one quits immediately.
It is a little complicated to understand the difference between itemAdded/itemUpdated in a library. If you upload the document, the itemAdded event fires. But after you have uploaded the document, sharepoint asks you to fill out the columns. At this point, the itemAdded event is already gone. If you fill in the columns and click save, the itemUpdated event will fire (although you are actually uploading a new item).
Let us know if this could work for you or if you need any further assistance.
Thanks for your suggestion
I was hopping to do this within 1 workflow, hence why I tried with the Parallel Action ; where one runs if a condition is met
and the other one stops if not met. Tried to compare the name of the uploaded file to check if it's already there and if YES then it should stop the workflow.
You suggested to create a new column in your list called something like "uploadNotificationSent" (yes/no, default value: no)
- I guess this will be a choice-option
So, how will the "uploadNotificationSent" column be updated ??? via the Workflow???
Ahhhh!! Wait wait ...
by default it is set to "no" so the workflow should filter IF CATEGORY is = Exec Update AND "NO" run the 1st WF ?
But will it not require the column to be updated to "yes" after 1st wf is completed?
The "uploadNotificationSent" column should be of type "yes/no" not a choice option. Choice option would work too, but it's easier to evaluate/set a yes/no column via nintex workflow.
And yes, you need to update this column at the end of the 1st Workflow, just as I said in my first post:
"At last you set the "uploadNotificationSent" to true"
Last bullet point of first WF instruction
Regarding the all-in-one WF with parallel actions:It maybe possible to put this all in one workflow. But then dont use the "Stop Workflow" action in one of your parallel paths. This would mean that if one condition is not set, the whole workflow is being terminated although the other condition may result to true and therefore your workflow should perform.
right ... I will keep u updated once I get some time to do it
ps: not sure about this "item added won't work because you don't have access to your list columns" but I have Admin rights
This remark isn't related to a permission issue. It is just SharePoint-Design and I can try to explain it a little further. Imagine the following:
Now you see where the problem is? If you start a workflow on the ItemAdded event, you will not have any information in the columns because you - as a user - will fill out these columns AFTER the ItemAdded event is already fired.
Long story short: If you want to run a workflow in a document library and you need to access the information from the columns, Workflow-Start on "When items are changed" won't work for you.
I am in process this and the CONDITION that I set to check at the very beginning is:
- check if "uploadNotificationSent" is equal to false and
- check if "category" is equal to "Exec Update"
Strangely, when I upload a file the condition does the opposite.
Currently, once a file has been added; the SET CONDITION goes the NO direction instead of YES
since I was not able to make it work the way as suggested by Phil.
I thought to myself why not try another approach as seen below:
I included a PAUSE FOR... 1minute because the SET A CONDITION seemed not to be picking up the uploadNotificatioSent=NO
Thinking to myself: maybe I should have used the RUN IF function instead ?? hmmm!!
Anyway, the above workflow hits 2 birds with one stone in other words; it does both :
I also changed the WF Settings:
Start when items are created: YES
Start when items are modified: CONDITIONAL > when category: Exec Update
The only tiny bit that bugs me is that the TIMER is taking longer than 1 minute (usually round 5 minutes)
Not sure why, but I guess might have to do with SharePoint Timer ??? (of which I do not have any control over)
Yes, the timer runs every time the WF runs and even when a file has been updated.
Any other suggestions about it...
PS: Special thanks to Phil for the support
As long as you have your workflow up and running, I'm happy
Regarding the timer job: You are right. The SharePoint Workflow Timer Job is set to 5 minutes by default. You could change this in the central administration (if you had permissions). So you can configure less than 5 minutes in the nintex action but the workflow will always wait at least 5 minutes.