Skip to main content

Hi Folks,

Up to now, I have not needed to start a workflow conditionally. I have a reference library and each document in the library has a process owner. When a reference document is updated we have the workflow send a notice to everyone on the program so they are alerted, for example to an update in a policy letter. The issue we are having is that when a change is made to the process owner (just a field in the library) we do not want to trigger the workflow. This sounds like it should be simple but I am struggling to come up with an idea/strategy to do this.

I see where the option to compare "Process Owner (previous value)" to the "Process Owner" exists and a "Equals" comparison would do the trick in most circumstances...

...but what if the document is updated and the Process Owner is updated. IN that case we would want the alert to go out, even thought there was a Process Owner change.

Any thoughts?

Regards,

Patrick

if document is updated, it's version should change, shouldn't it?

if only process owner is changed, document version should not change.

so you could base your condition on these two fields.


If you mean by "document version" the sharepoint-version, then this will change if you change any meta-data. You could try to go by file-size ... but this could be tricky as well, since you might change the content without changing the file-size.


So the need is..

  • do NOT trigger workflow if ONLY Process Owner is changed.
  • AND... trigger workflow for all other changes.
  • AND... sometimes this can include a change to the Process Owner.

I stared at the conditional abilities for a bit and it's definitely a logic puzzle I will be thinking about .. very fox, goose, grain.

I am going to continue thinking about this but it might come down to a checkbox .. "Run Workflow?" on form. (That's the cheating way out, though.)

I will keep thinking.


Hi Henning,

You are correct about the version issue. An I agree that file-size would be unreliable.

Thanks for Responding!

Patrick


Hi Marian,

Thanks for responding! As ‌ mentioned, the version changes with meta-data edits.

Regards,

Patrick


Hi Rhia,

Thanks for responding and thinking so deeply on this. I agree... this is a puzzle. happy.png Let me know if you have an idea!!

Regards,

Patrick


I started down the path of considering each field as a numerical item... Process Owner as 0 and everything else as 1 ... and all updated fields added together in a calculated field to produce either a 0, or a number larger than 0. That'd make a conditional start quite easy ... but ... I am trying to figure out how to determine whether or not a field in a form is updated from what it last was.

I think this might be a javascript thing plain.png ... maybe there is something simpler that I'm missing, though.


I think the biggest problem is to to detect if the document itself changed. IMHO this is not really accessible.


Well,  consider someone would just upload a new document. This would not necessary involve filling out a form. So there might no Javascript available.


Well, this is only for modification, not for new.. so maybe we could target only those items with modification dates...

Not sure..


I don't want to be the party pooper,  but you could upload a document and choose "replace existing" to modify an existing document without seeing the form.


Image result for party pooper meme


You may need to attack this from a process perspective.  For example, if you have major/minor versions, you only notify people when a major version is published.  They have the people making the changes make sure that if they make one of the changes that require people to be notified, they publish a major version.  Not fool proof, but as ‌ has pointed out, it's going to be hard to determine when a document has been modified.  Technically, actually modifying the content in a document, as well as changing the Process Owner is modifying the document, as it's a property of the document.  


Any new thoughts on how you will tackle this, ‌?


No... Not yet. I have been tied up with my report production for last month so I have not had a chance to look back into it. I currently have it set to not send an alert if the Process Owner changes with the customer understanding that he should make document edits distinct from metadata edits. I will try and focus ion this again soon.


Another thought: if you can't get around it conditionally within the conditional .. conditions, you could put in a "run if" action in the workflow (with whatever other information needed) and say "If this is true, end workflow."

Not the cleanest approach but it might help if nothing else does..


I will look into that. Thanks!


I don't thin you will be able to tell OOB in a document library if only the metadata changed and not the document itself.  What if you have a separate list with the Doc Owner and a document identifier as a primary key (an identifier that won't change).  Update the Doc Owner from a separate list and run your workflow there.  In the doc library add a lookup  to the identifier and choose display the Doc Owner from the additional fields - then create your view(s).  I haven't test it... but I think you need to look away from your doc library.


I haven't meant document library item version.

I have meant version (or revision number ) that can be seen in document properties dialog (at least for office documents, which I somehow assumed is your case). these properties can be promoted to document library column - see Document Information Panel and Document Properties in SharePoint Server 2010 (ECM) 

I've tried to play a bit with it for a while, but unfortunately haven't manged to promote 'Revision number' property which is automatically incremented with every document save. it worked for a property I created myself or even for another default property 'Revision' which I was able to change within document property panel.

not sure whether I did something wrong or it's restriction of my env or any other reason. it would need further  investigation (which I do not have time for sad.png)

hopefully it will give you at least an another idea how could you approach to your requirement.

maybe you'll find a way how to get it working for that autoincremented 'Revision number'.

or maybe you could write a small macro that would update some of those properties with every save or check in.

here is my achievement


I think this is a limitation of word/sharepoint. The revision from word is just simply not available in/can not be promoted to  sharepoint.


Hi Brendan,

This sounds like a pretty good approach. I will look into it and see if it works for the customer and let you know.

Thanks!

Patrick


Patrick Kelligan‌ - 

I would recommend using some sort of checkbox or trigger that the updating user can push to have the workflow run. While this is not automated, it does give you (or the user) the ability to determine what updates are worthy of a notification.

I'll have to think on this one a bit more and play with some scenarios....

Hope this helps!


Thanks ‌,

You are right, while this is not automated, at least the user will need to make a conscious decision as to whether the workflow runs or not. Thanks!


Reply