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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Search field some text...
Power Apps
Answered

Search field some text to launch hard coded phone number

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
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")
Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at
    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.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    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
  • mdevaney Profile Picture
    29,993 Moderator on at
    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.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    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

     

     

    if statement.png
  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 

    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."

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    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 Power Platform Member Profile Picture
    Microsoft Employee on at

    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

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 360 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 325

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard