cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rups921
Level: Powered On

Search field some text to launch hard coded phone number

Is there a possibility to make something?
On the gallery, i've got a field with various text.
Is it then possible to make an if statement or containt or match to call a hard coded tel number?
 
Just like something
If(Contains "Some text";
Launch ("tel:xxxxxxxxxx")
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: If field contact text run launch

@rups921 

Your example is very good and now I understand what you would like to do.

 

I assume you have some label/text input in your form.  When the label/text input is clicked a phone number will be called if it matches the name on a list.

 

Try this code in the OnSelect property of your label/text input.  You will need to customize for your own situation but I think it shows the concept very well.

 

If(
    "Apple" in Label1.Text,Launch("tel:6141234567"),
    "Google" in Label1.Text,Launch("tel:2049876543"),
    "Microsoft" in Label1.Text,Launch("tel:2325648976")
);

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

7 REPLIES 7
Super User
Super User

Re: If field contact text run launch

Are you just having an issue with writing the conditiondal statement for IF? You could try this.

If(Not(IsBlank(TextInput1.Text)); Launch("tel:xxxxxxxxxx"));;

—-
Please Accept as Solution if this post answered your question so others may find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
rups921
Level: Powered On

Re: If field contact text run launch

the above is intended for the entire text input? but I have 1 text box with a reasonable text and it has to look at part of the text.
so something with contains or match
Super User
Super User

Re: If field contact text run launch

It would be helpful if you can provide an exact scenario. Screenshots help too. I would be happy to help if it’s something I am familiar with.

Earlier I thought you just wanted to detect whether the field was blank, lol.
rups921
Level: Powered On

Re: If field contact text run launch

Maybe this will help.

What i mean;

If the texfield (Viewmode) entry match like "Windows" then call windows.

If the entry contains "Apple" then call apple

 

 

Super User
Super User

Re: If field contact text run launch

@rups921 

Your example is very good and now I understand what you would like to do.

 

I assume you have some label/text input in your form.  When the label/text input is clicked a phone number will be called if it matches the name on a list.

 

Try this code in the OnSelect property of your label/text input.  You will need to customize for your own situation but I think it shows the concept very well.

 

If(
    "Apple" in Label1.Text,Launch("tel:6141234567"),
    "Google" in Label1.Text,Launch("tel:2049876543"),
    "Microsoft" in Label1.Text,Launch("tel:2325648976")
);

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Community Support Team
Community Support Team

Re: If field contact text run launch

Hi @rups921 ,

Do you want to call different phone number (using Launch function) based on the "Uitvoerende Partij" column value in your Display form?

 

Based on the formula you provided, I think there is something wrong with it. There is no function called "Match" in PowerApps.

I have made a test on my side, please consider take a try with the following workaround:

Set the OnSelect property of the DataCardValue60 ("Uitvoerende Partij" Label) in your Display form to following:

If(
   "Entelec" in ThisItem.'Uitvoerende Partij',
    Launch("tel:xxxxxxx"),
    "Entelec2" in ThisItem.'Uitvoerende Partij',
    Launch("tel:00000000"),
    ...
)

or

If(
   IsMatch(ThisItem.'Uitvoerende Partij', "Entelec"),
   Launch("tel:xxxxxxxx"),
   IsMatch(ThisItem.'Uitvoerende Partij', "Entelec2"),
   Launch("tel:00000000"),
   ...
)

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rups921
Level: Powered On

Re: If field contact text run launch

Thanks! This one worked for me.

Even if i make a special button at tho bottom of the gallery :).

So now i can move on

 

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,892)