0

The idea is to replace paper book called "exit book" that was lying several years at the exit of building where i work.

So I created simple list with 2 content types, one of them called "employee exit". Each employee must create an entry on this list when he walks out of building. He declares destination, date and time of going out and returning to his office/building.

Everything works fine, but, as always, there is a caveat. I need to give the user ability to adjust his entries if he or she will get back earlier or later than declared.

So i created a workflow "set permissions", which looks for "time of return" and compares it to entry "modified" attibute. If "modified" is later than "time of return" then entry is "closed": user losts ability to edit entry anymore. Else - user is given rights to edit entry again, and again and again - until the comparision is true.

And this works fine too, but... what if we have this scenario:

1) it is 9AM and user declares his exit from 10:00AM to 11:00AM, 2) it is 11:05AM and user want to "confirm" that he went back at 11:00AM, so he goes to editing the entry, changes nothing, and saves the form

Sadly, Sharepoint treats this situation as "nothing changed" and workflows does not start.

Any ideas how can i start this workflow to change permissions even if there was no change on form?

Tried to do some hidden attributes, but with no luck. Maybe You can help :)

1 Answer 1

0

Why would the user edit the entry at all if they don't change anything?

If they want to "confirm" that they are back, this should be recorded in a field.

Maybe you could add a column for "Status". The default value (when a new item is created) is "out" and when the user confirms that s/he is back, they set it to "in". That's how they confirm that they are back, and they actually change the item. Since a value actually gets changed, the workflow should then kick off.

4
  • I was hoping for better solution, where the system knows that I'm "back" because the end date is earlier than date of saving the form. But Your solution has advantage - the user actually sees the checkbox ("out"/"back") and doesn't have to guess what will system do and how to "close" the entry. Commented Jul 8, 2013 at 9:46
  • If you have the enterprise license with InfoPath Forms Services enabled, you could edit the list form with InfoPath and change the "Edit" form to be just one button, i.e. "I'm back in the office". The user edits the form, the Edit form shows just that button. The user clicks the button. Rules then set the status field from "out" to "back" and the form is saved. Then the workflow kicks in. This way, the user does not have to find the correct field among so many fields in the form.
    – teylyn
    Commented Jul 8, 2013 at 10:31
  • I've done it with new field visible to employee, but i think i could use another solution available without coding - quick action. I tried this several months ago but just forgot that this exists. Commented Jul 9, 2013 at 10:15
  • In a similar situation, I added a checkbox that the user must click. This updates the item and the workflow kicks off. at the end of the workflow, I reset the checkbox back to default.
    – 1c1cle
    Commented Aug 28, 2013 at 19:16

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.