695
Views
5
Comments
how to get name of previous screen in current screen in mobile app
Question

Hi All,

I need to capture current and previous screen name at our backend.

so please help me to get previous screen name where i navigated to current screen.

UserImage.jpg
nemo

Hi,

If you only need the previous screen name in a particular screen, I think you can send a input parameter of the previous screen's name.

2020-08-17 11-09-43
Guilherme Oliveira

Hello,

You can use this Server Action from HTTPRequestHandler, that gives you the name of the current Screen. 

If you need the name of the previous screen, you can use this SA in that Screen and store the value in a Session Variable or something like that to use when you navigate between screens.

Best Regards,

Guilherme Oliveira




UserImage.jpg
Swapnil Shinde

Guilherme Oliveira wrote:

Hello,

You can use this Server Action from HTTPRequestHandler, that gives you the name of the current Screen. 

If you need the name of the previous screen, you can use this SA in that Screen and store the value in a Session Variable or something like that to use when you navigate between screens.

Best Regards,

Guilherme Oliveira




 Hi

but how can i pass a value to the next screen on android / ios  back button action,

can you show some example for mobile app.

is there any in build function??

 

UserImage.jpg
Thi Pham

thank you for your suggestion, but when i used it in a client action, I assign the pagename output into JS parameter and it shows nothing even before move to JS, can u please rcm any solution for this? thank you so much 

2021-04-09 11-42-43
assif_tiger
 
MVP

Hi Swapnil Shinde ,
Thanks for clarifying that it's a mobile app thread.

Perhaps coming to the question:
- You must be having a Back Button Action that you created on each screen.
- Then addition to this, you might also be using the AndroidBackKey Handler which helps you to manipulate the BackKey event i.e what we have on only Android Devices.

Now what you can do is ..
- As mention above you can start using the Input variable in eachScreen to remember the LastScreen Name [ Which I'll not recommend ]

or

- If you are using Reactive then you can use Client Variable to hold the name of LastScreen & set it on every Navigation.

or

- If using Traditional Mobile then go for using the SharedPref to hold the screenName.
http://outsystems.com/forge/component-overview/5013/android-ios-shared-user-preferences

or
- Here something that can help you:
https://www.outsystems.com/forums/discussion/46106/previous-screen-on-mobile/#Post168349


Hope it helps,

Assif

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.