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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps Dynamics For...
Power Apps
Unanswered

Powerapps Dynamics Form Phone Number Field Set Prefix

(0) ShareShare
ReportReport
Posted on by 2

I am seeing the set +27 but it is not showing on the front end or through to Dynamics CE. I need for a user to enter 079123456789 onto the form (079/067/083 etc as the input beginning) and the 0 replaced by +27 leaving it as eg +2779123456789. Please can someone advise where I am going wrong on the input mask or if there is an alternative solution even if a preset for +27 and then the number. I am using Power Apps Forms. Thank you.

 

form.png (This is what is showing front end for which doesn't match what's on the backend form) 

I have the same question (0)
  • Verified answer
    cchannon Profile Picture
    4,702 Moderator on at

    Field Masking will not replace values, it only validates and adds in any literals you've put into the mask. So the Masking control will not replace 0 with +27: You will get +27079123456789 (which will fail validation because it is too long). Just skip the 0 and it should work. But if your users NEED to enter the 0, then you will need to come up with your own masking approach (through formscript, most likely).

  • Beccaish Profile Picture
    2 on at

    Thank you. I need to put something into the masking like 000 or 999 like I did but need the 0 to be replaced by +27 as all users add 0...... What is formscript?

  • cchannon Profile Picture
    4,702 Moderator on at

    Formscript is Dataverse's supported client-side javascript code execution option. It gives you a way to register javascript code, with an easy-to-use platform API that helps you to create realtime, user-interactive logic on model driven app pages. For example, it would let you write an event that fires every time the phone number field is updated by a user to grab that leading 0 and replace it with +27

     

    Apply business logic using client scripting in model-driven apps using JavaScript - Power Apps | Microsoft Learn

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard