Controls in Dynamics 365 for Mobile App: Input Mask

By | February 9, 2017

Controls In Dynamics 365 for Mobile App: Input Mask


Dynamics 365 provides a wide variety of controls which allow developers to add interactive components in the Dynamics 365 mobile app. Each control supports a specific set of input so you can handle variety of data inputs, for instance when a user enters a text, scans a barcode or simply touches a button.

This is a blog series where we will explore various Controls in Dynamics 365 and their use case scenario. Let us start with Input Mask control which is a user generated set of rules to validate the field. It oversees what a user is allowed to input in a text field. This control allow users to set the formatting for a field like phone number, postal code, credit card number, etc. to prevent transcription errors for Mobile and Tablet users.

Note: Input Mask control only supports Single Line of Text field type.

Let us see an example where we want to allow users to add the phone number in the field on the Account record, in a format predefined by us:

  1. Create a field of Single Line of Text type as ‘Phone’ on the Account entity form, as shown below;

Controls in Dynamics 365

  1. Select the created field ‘phone’ and click on Change Properties and then select controls from Field Properties to Add Control, as shown in the screenshot below;

Input Mask Control

  1. Now add the Input Mask control as shown below;

Input Mask control Dynamics 365

  1. Then enable the control for Mobile and Tablet, as seen in the screenshot below;

Controls in Dynamics 365 for Mobile and Tablet

  1. Users can configure the Mask property in two ways as follows:
    • Bind to a static value
    • Bind to a value on a field

Let us explore both the ways in detail;

  • Bind to a static value:
    • Users can create the format of the field in which they want to enter the data by using the available options, as seen in the screenshot below;Input Mask Controls
    • It will set the mask on “phone” field and allow users to enter the data as per the predefined format or mask.Controls in Dynamics 365 for Mobile
    • If any user tries to enter the data in another format, it will show the following error;Input Mask Controls in Dynamics 365
  • Bind to a value on a field:
    • This is another way to apply predefined field mask. It will show the list of string fields available on the entity form.
    • In the below example, we are going to store the format of the value in a field and will refer the same field for validation.
    • First, we created a field named “Phone No. Format” and stored the format of the value in it:Controls in Dynamics 365
    • Then, we hide this field on the form as seen in the screenshot below;Input Mask Controls in Dynamics 365 for Tablet
    • Now, we will refer the created format by using Bind to a value on a field option as shown below;Controls in Dynamics 365 for Tablet
    • After following the above mentioned steps, users can now enter the phone number only in the format predefined by us.Mask Controls in Dynamics 365
    • If any user tries to enter it in another format , it will show the following error;Controls in Dynamics 365 for Mobile and Tablet

Conclusion: Input Mask Control will help to maintain data integrity by eliminating data entry errors by users on Mobile or Tablet. This is extremely useful in situations where we want to ensure that important data like credit card number, postal code, phone number, etc. is entered in the correct format by the users.

Generate Your Own New Leads Within Microsoft Dynamics 365 CRM

Contact us for a demo to know more about how Maplytics can help you to generate new leads from within Microsoft Dynamics 365 CRM.

Maplytics is a 5-star rated, preferred business app on the Microsoft AppSource that is Certified for Microsoft Dynamics 365 (CfMD) and comes with powerful features like Appointment Planning, Sales Routing, Territory Management, Heat Maps, Geo-analytical Dashboards and more that empower organizations to add more value to their CRM data, improve sales & service processes, and achieve high ROI.

Get your free trial from our Website or Microsoft AppSource!

‘If data is the new oil, location intelligence is ??”

4 thoughts on “Controls in Dynamics 365 for Mobile App: Input Mask

  1. Leigh Milbourne

    Hi. I have a few concerns about this control which I would like to get your opinion on.

    1. When configuring the control on a single line of text field formatted as a phone (the actual field configuration) you are no longer able to click-to-call so you lose that functionality.

    2. If using literals in the mask these aren’t saved against the field. This would cause issues when including the field in a view (as the mask literals won’t be included, and for any systems integrations.

    3. If you don’t use literals then the user isn’t restricted enough in some cases where an specific character is required and additional validation would be neede. For example, using the input mask “#” for the beginning of an international phone number allows the user to enter characters other than the + sign, which is required for the beginning.

    1. inogic

      Yes, if you add input mask control to any text field, then you will lose click-to-call functionality and as per our knowledge it does not show the format of mask in the field by default. However, when we entered wrong value in the field then on saving it shows the error with mask format.


  2. dj

    long shot I know, but here goes.

    is there a way to have an input mask for phone numbers with and without an extension?


    1. Inogic


      Yes, it is possible to set the input mask for phone numbers with and without an extension.

      For that you can configure input mask as per below screenshot.

      1) With an extension:

      Here, (000) is the country code 000 is the area code and 0000 is local number and last 4 digit i.e. 0000 is the extension.

      2) Without an extension:

      Hope that helps!

Comments are closed.