Skip to main content

Hi all, 

We are trying to set a regular expression value on a field on FSM Mobile Application, but there is no dedicated tab to do so.

Is there a way to put a regular expression to a field in Mobile?

 

*Kindly find attached screenshots of the Field Properties screen from FSM Mobile.

 

Thank you in advance,

Dimitri

 

 

 

@Anjula Priyanath FYI


Hi @DimitrisK,

As you already aware, there is no OOTB functionality to use in mobile for regular expression.

So, if you need to implement this, it might some solution with customization(recommended) or configuration using client scripts.

 

  • I suggest you to do this in code level. Then, it would be very easy to handle this. If you need to have more control on configuring the expression format, you can store the format in database(maybe using custom app param) and handle this via Android code. If user needs to change the format, then no need to change the customization with this approach. But, user should use proper regular expression against java as you will validate it in the code level (depending on your implementation).
  • Second option would be configuration. I would say a workaround. In order to use client script, you should choose an event to trigger the script. If you are going to use a client script with whatever event, you should write your own logic in the script.
    • Value change event – You may get some errors when using this event, because when user types something on the field the script will be triggered. To overcome this situation, you can use some extra logic such as length of the value/ just checking the format till the end of the value/ etc. – But it’s not recommended to use this event for this requirement, as it might be impact to the mobile performance.
    • Add/ Save/ Next buttons – You can use your own script on floating action button of the screen as a validation script. Depending on the logic, you can return true or false will continue or terminate the process of the button. Please note that you may have some limitations against the screen. Because there are some special functionalities implemented in the baseline code level for buttons on screen.

Thank you.


Reply