There is a status column (enum) with values, say, โLiveโ, โDeadโ, โOngoingโ, โDoneโ, โTo be doneโ.
Thereโs always a default value for it, say โLiveโ.
There are actions to mark the column with values.
Say thereโs an action named โMark doneโ that sets the column value to โdoneโ, from its current state, say โOngoingโ
Can any action be defined that would revert back to the previous state; in this case, to โongoingโ?
You can use this:
[_THISROW_BEFORE].[STATUS]
Not particularly. I believe the _before only has access to the information from the same action so if you changed it to done and then โexitedโ the action there is no record of the ongoing status.
You would have to implement this yourself; there is no built-in way to do it.
I was hoping that you would enlighten me with possible ways of doing that
Please explore if following helps. You could possible have an action called โPreviousโ with an action icon such as ( <-- ) and actionโs โSet this columnโ expression that sets the [Status] column to previous state with an expression like
IFS([Status]=โDoneโ, โOngoingโ, [Status]=โOngoingโ, โTo be Doneโ)and so on.
The display name for this action could be
IFS([Status]=โDoneโ, "Ongoing <-- Done ", [Status]=โOngoingโ, โTo be Done <- Ongoingโ) and so on. So the action name always displays current status and previous status that the action will take to on tapping it.
Of course , there may be some other dependent logic in your app that you may need to implement, in โthis action is available for only those rowsโ setting. This will be needed to ensure a totally free movement to previous status is not possible, say when the final status โdoneโ is signed off.
A sample below
the action with -> icon takes to next status and the action with <-- takes to previous statuses in sequntial manner.
column named previous status and when you set the row to a new status you set this value to be the previous status
User | Count |
---|---|
15 | |
12 | |
9 | |
8 | |
4 |