Action to revert back to 'previous' state

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โ€™?

0 6 238
6 REPLIES 6

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.

Steve
Platinum 4
Platinum 4

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.

3X_d_7_d7fed2b76bc06f7f40bc41d7e7d4746423a2ab9a.png

column named previous status and when you set the row to a new status you set this value to be the previous status

Top Labels in this Space