Hello,
Requirement: User will input a phone number and the result should be a dynamic URL based on the user input.
Ex: User Input: 9998887777 - Output URL: +1-999-888-7777@qwerty.zxcv.org which is a MailTo: URL - user should be able to click on it and the default mail application opens up and pre-fills the "To" with this dynamic URL.
The input can only be a phone number and should be in XXX-XXX-XXXX format so validation required. If this is difficult, then may be add three separate boxes for user to enter the phone number in: XXX XXX XXXX and generate the URL.
Any ideas?
Thanks in advance!
Solved! Go to Solution.
Hi @BB9 ,
Workaround 1- use three text box to validate the number
Set Format of three text box to Number, and set OnSelect property of mail icon as below:
Launch("mailto:" & Concatenate("+1-",TextInput1.Text,TextInput1_1.Text,TextInput1_2.Text,"@qwerty.zxcv.org"))
Work around 2 - Use IsMatch function to validate the number
Set Format of text box to Text, Set OnSelect of Mail icon as below:
If(IsMatch(TextInput1.Text,"\d{3}-\d{3}-\d{3}"),Launch("mailto:" & Concatenate("+1-",TextInput1.Text,"@qwerty.zxcv.org")),Notify("Invalid format",NotificationType.Error))
Sik
Hi @BB9 ,
Workaround 1- use three text box to validate the number
Set Format of three text box to Number, and set OnSelect property of mail icon as below:
Launch("mailto:" & Concatenate("+1-",TextInput1.Text,TextInput1_1.Text,TextInput1_2.Text,"@qwerty.zxcv.org"))
Work around 2 - Use IsMatch function to validate the number
Set Format of text box to Text, Set OnSelect of Mail icon as below:
If(IsMatch(TextInput1.Text,"\d{3}-\d{3}-\d{3}"),Launch("mailto:" & Concatenate("+1-",TextInput1.Text,"@qwerty.zxcv.org")),Notify("Invalid format",NotificationType.Error))
Sik
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
15 | |
12 | |
10 | |
6 | |
1 |
User | Count |
---|---|
26 | |
18 | |
15 | |
10 | |
3 |