Previous step ID or name accessible in App Info

The app transition for Previous Step (Go To Step > Previous) seems to work by backtracking the step history.

I’d like to be able to access the name property of the step that I’ve come from. My use case is my Slack alerts page, which allows operators to provide feedback. As such, knowing which page they came from helps immensely, especially when bug hunting. The alternative is to add a trigger on the Base Layout on step exit to update a Last Page variable.

I’m hoping that this can be a quick win by exposing this property in the App Info section.

Hi @Preston, thanks for your suggestion. I’m following your need and use case for this. If we were to expose ‘Last Viewed Step’ as an App Info variable, can you explain more details to what you would do thereafter in your app?

It would be used in an expression to send off to our Slack webhook, allowing our team to easily understand the context of the error. See the example below of what a message might look like.

'*Message:* ' + @Variable.slackMessage  + '
*Last Step:* ' + @App Info.Last Viewed Step

Perhaps in the future it might be nice to implement a URL here so that one can load directly into the affected step in the web editor, but at the moment we don’t see that as necessary.

1 Like

Thanks for the additional details. We will see what we can do!

Just make sure to be crystal clear-- the “Last Viewed Step” is not the same as the “Previous” step because the logic of the previous button is technically a stack of previous steps. Both could be useful.

Can you please expand on this?

Hey Preston, hope you are well.

If I go through three steps:

Step A
Step B
Step C

Then hit “Previous” to go back to Step B.

Hitting “Previous” would be going to Step A.

But my “Last Viewed Step” would technically be Step C.

I am not sure what I would formally call these, but there is a difference.

1 Like

Thanks for the clarification Daniel! I see the potential for confusion, and agree that having both values could be useful.

I don’t think so, because you start at Step C with the “previous”. So when you go to the previous step (Step B) the previous isn’t Step C but Step A on the way to come to Step C.

Otherwise you never came back to Step A, cause, IF Step C is the previous of Step B and you go to it, then Step B is technically the previous of Step C (which is the previous of Step B is the previous of Step C and so on).
Only the step directly before the last Step would be reachable.

The previous functionality is like a stack go back in reverse order (web browser f.e.)

But I agree: it’s very useful to know the step where you came from.

Chris