web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Text-Field Input Mask Definition depends on another Field

(0) ShareShare
ReportReport
Posted on by 15

Hi,

is it possible in Dynamics 365 CRM to define the Input Mask of a Text-Field depends on another Field in the Form?

My Scenario is:

- In the Account Form, I have a custom Field for Country and a Text-Field.

- When the User choose a country then the Text-Field should have an Input-Mask

- for each country, the Input Mask is different. 

best regards

Ziad

I have the same question (0)
  • Suggested answer
    Marco.P Profile Picture
    2,405 on at

    Hi,

    If i were you, i would:

    • create two text field with their own input mask.
    • make those two field hidden
    • add a business rule that check the value in country field and show only the right input mask field

    Also refer to this to make mask control validation:

    https://www.inogic.com/blog/2017/02/controls-in-dynamics-365-for-mobile-app-input-mask/

    Hope it helps,

    Marco


    If you found the answer helpful for you or other readers, please mark as Verified.

  • Marco.P Profile Picture
    2,405 on at

    Hi Ziad Eltoufeili,

    Any news? Did you try mi proposed solution ?

  • Ziad Eltoufeili Profile Picture
    15 on at

    Hi Marco,

    thanks for your response. It works fine. I am searching to find a solution for this Format: 6 digits (1 Sign (+/-) or the Character A) 3 digits e.g.: 123456A123 or 123456+123.

    best regards

    Ziad  

  • Johao Larios Profile Picture
    1,795 on at

    Hello,

    You can achieve this also by implementing a javascript. If you need to save the data with the actual mask, my recommendation is create a text fields and then modify it values accordingly using javascript: 

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/attributes/getvalue --->to obtain the value for the fields, you can use this one to get the value from the field that will determine what mask use as well. 

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/attributes/setvalue --->to set the actual value. 

    Yo may need this one as well: https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/attributes/fireonchange 

    Hope this information helps to achieve your goal.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans