Hey Community friends,
I have built an Emergency Contacts List App and I have programmed a phone Icon to dial out to a work cell phone but if there is a contact that does not have a work phone it will launch with a blank field in the phone app..
I am curious to know if I can handle a phone number selection via an IF statement? I tried this but get a warning for "incompatible type" yet they are both phone numbers?
If(
WorkCellPhone_DataCard1.Default = true,
Launch("tel:" & WorkCellPhone_DataCard1.Default),
Launch("tel:" & PersonalCellPhone_DataCard1.Default)
)
Alternatively I found I can add an icon/button per individual contact and manually code it one by one but that will take a while...
Any suggestions are appreciated!
There some issues:
1. You should be referring to dacardvalue not the Datacard
2. End the Datacaradvalue with text not Default
3. I tried changing the logic to if The Datacaradvalue is blank. Although not sure if that is what you want to achieve. Because putting is true mean the Datacaradvalue contains the word true
If( !IsBlank(WorkCellPhone_DataCardValue.Text), Launch("tel:" & WorkCellPhone_DataCardValue.Text), Launch("tel:" & PersonalCellPhone_DataCardValue.Text) )
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
255 | |
126 | |
85 | |
84 | |
67 |