1

I want to start a approval workflow (SharePoint 2010) only on items that have certain criteria met.

At the moment I'm thinking about adding javascript logic into the Workflow.aspx. This logic will hide the start-button of the approval workflow if the criteria are not satisfied.

Is this a good approach? Do you have other/better ideas how to implement this?

1 Answer 1

2

Depends on what the criteria is but there are several options you can take.

You could make the fields validated on the columns themselves so that way the user cannot post anything that doesn't have the necessary fields. Working off that idea, you could create a calculated column that checks for all the criteria, and have the workflow fire on item modified, checking the calculated column.

Or you can do the criteria inside the workflow, checking the necessary fields for the values they should contain. This may be the easiest solution, but depending on how many workflows will be firing, may affect performance, since there will be a workflow fired every time an item is created or modified.

If the fields are only specific to the workflow, take them out of the list/library fields and put them into workflow variables. The user must specify the initial workflow variables whenever he/she tries to start a workflow manually.

2
  • Thanks for your ideas mike. unfortunately your ideas not hit my problem. But I think what I want is not possible
    – AHO
    Dec 17, 2013 at 13:42
  • can you explain? Why do you want to hide the workflow approval button? What are you trying to accomplish by doing so? I'm trying to understand your point of view so I can better answer your question.
    – Mike
    Dec 17, 2013 at 16:35

Your Answer

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

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