Hey guys,
just curious, is there a way, in reactive, to get the previous screen name?
I'm pretty sure some of you already have crossed on the following requirement:
"In this screen, the button A should be :
Usually, we add an input parameter in the screen where we have the button, to know where it came from, but if there was a way to avoid having that parameter, that would be great!
Thanks in advance,
Nelson
Using Javascript
https://stackoverflow.com/questions/3528324/how-to-get-the-previous-url-in-javascript
You can use this command to know the last URL, then you just need to see a way of getting the name of the screen.
document.referrer
You can use this example
var path = window.location.pathname;
var page = path.split("/").pop();
console.log( page );
https://stackoverflow.com/questions/16611497/how-can-i-get-the-name-of-an-html-page-in-javascript
Thank you Márcio, that worked.
Was wondering if the platform or OutSystemsUI shouldn't have a function with this, but anyway, you solved my case.
Thanks again.
This answer not working in reactive =/
Indeed this solution doesn't work for reactive apps @Thiago Mari @Márcio Carvalho