Workflow task to change field back to what it was - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8) +--- Thread: Workflow task to change field back to what it was (/showthread.php?tid=2011) |
Workflow task to change field back to what it was - Guido1982 - 11-03-2020 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? RE: Workflow task to change field back to what it was - joebordes - 11-10-2020 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. RE: Workflow task to change field back to what it was - Guido1982 - 11-10-2020 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. |