Approve and Decline by Department
Jul 13, 2009
http://www.bleedyellow.com/blogs/DominoHerald/entry/approve_and_decline_by_department?lang=en_us
People move jobs. People take vacations. People change their names. All sorts of things can mean a document sent to Sally now needs to go to Tom. Combine that with the omni-present 'changes in business practices or workflow', I wanted to come up with a routine that would account for this, put it in my bag of tricks and pull it out when needed. The direction I decided to go was to have people assigned to "Departments". People can be added or changed from any department as needed. Whenever someone goes in to approve or decline, the code takes their name, and sees what department(s) they are with, and records from there. Basically, it changes the dynamic from approval by person to approval by position. Also, it means that when someone changes jobs, you don't need to update all the the documents, the code uses the department name to get the current values.

I keep track of all the approvals and declensions, so people can see how the process changes. Here is the basic design:
image

You need to create a view containing documents sorted by the department and the username. Here is a picture by department:
image

And by name:
image

 There is a single button that when clicks lets the user approve or decline. Here is the code for that:

Approve-Decline Action

Like I mentioned, it lets people change their mind. The first field can be populated by existing the first field, here is the code for that:

Populate Fields

The workflow on this goes pretty well, and sets up a good flexible basis for sign-offs.

Cheers,
Brian
This is an archive of my previous blog http://www.bleedyellow.com/blogs/DominoHerald attachments are in the download control