Question

Is there a way to detect when a user has left a screen in mobile and to show a message to warn them to save data?

  • 3 November 2022
  • 5 replies
  • 142 views

Badge +1

Hello,

we have many users on mobile FSM that need to enter notes on pieces of equipment that they are working on. However, many users, instead of hitting save, decide to leave the screen they’re on and move past it, thus the notes don’t get saved. Then later on, we generate reports based on the work performed and the users get frustrated when the notes they entered are absent from the reports. We have tried to reinforce saving notes many times in the past, but we’ve now decided to try and find a way to make it so they are warned to save before leaving the screen they’re on. 

Is there a way to programmatically detect when the user is trying to leave the screen they’re on and to maybe show a pop-up window to warn them that they are leaving the screen without saving their data? This is one of our big items to hopefully resolve, as many of our customers require notes on service reports that we generate, and frustration occurs when notes are missing.


5 replies

Userlevel 5
Badge +9

This is currently not possible through Mobile Configuration. It has been accomplished through code customization.

Badge +4

@GDFAPIETRZAK 

 

As the previous answer explains, to completely handle the above scenario you would need a code customization for mobile.

 

On configuration level,

Assuming user will only using buttons within fsm (and not the OS level buttons like back, home),

You should be able to override the Next workflow button using a client script (before the user proceed to the next workflow screen).

 

With the use of client script functions like getFromCache, setCache you can capture that the user has changed the note field on the screen and force the user to save before (or save changes using saveChanges() function)  proceeding to the next workflow screen.

 

 

Userlevel 5
Badge +9

Thanks for your input, @nimesha.kalinga.  The screen on which these mobile users are entering the Note and not pressing the Save button is a custom mobile screen - and the users are going to the Jump To menu to go to another screen.  This custom screen doesn’t have a Next button.  Perhaps if the custom screen is adjusted to be more like a Workflow screen, and the Save button is replaced with a Next button, your configuration suggestion may work.

@GDFAPIETRZAK 

Badge +1

Would this suggestion work if they use the Jump To menus, or the sidebar on the app? i.e. if they try to jump to another screen in the app without hitting the “next” button? Because the issue is users are using those menus to jump around instead of saving. 

Userlevel 5
Badge +9

The Jump menu is not part of the Workflow screens.  The only programmatic way that FSM Mobile automatically saves the data entered on a Workflow screen is by the user pressing the Next or Save button on the screen.

The previous suggestion notes, “Assuming user will only using buttons within fsm (and not the OS level buttons like back, home)”

The Jump menu is not a “button” within FSM.

As answered by Mobile R&D, Mobile Consulting, and Mobile Software Engineer, this can be done through a code customization.  It’s not possible through Mobile Designer configuration.

@GDFAPIETRZAK 

Reply