Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Workflow task to change field back to what it was
#1
I have a request that I think I could code or that maybe already exists. The user wants to activate a workflow task that, under certain circumstances at least, reverts a field to its previous state. Of course the modtracker should be enabled for this field but is that case, could it be done?
Reply
#2
Yes, this could be done if ModTracker is active on the module. One of the challenges is determining which change you want to go back to. Imagine a field that has changed 10 times, which value does the user actually want to recover?

If you want to give the user the option to select the value I would create a detail view widget where the user could select the field, see the possible values and select which one he wants to revert to. It would be nice to have this as an option on each field, sort of a popup that appears on the field when you right-click or hover...

If you just want to go back to the previous value I would create a workflow expression function: getPreviousValue (or similar) that could be used in the update field task.
Joe
TSolucio
Reply
#3
Well for this particular usecase I am mainly interested in the reverting to a previous value (one step back) without the user realizing it. I do think it would be a good idea to enable the workflow admin to set the no. of steps you can go back.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)