Click-to-call phone numbers

@Londya_Adam posted this question in the community:

Coda doesn’t have a “Phone Number” column type, but you can create a click-to-call number by putting “tel:” before the phone number as the hyperlink for the phone number. This way, when you tap the number in the mobile app, it will launch your phone’s default phone dialer. See the formula in the Click-to-call column:

12 Likes

Hey team, any plan to implement it natively? :slight_smile: it’s a bit annoying having an additional column for that :slight_smile: and I think it is extremely useful as a “column type” :slight_smile:

Hi @Francesco_Pistillo, I’ll definitely add this to our backlog! Through formulas and buttons, you can get a pretty neat list of phone numbers to dial. We published a template with this specific use case here!

3 Likes

Woah! Love this feature. Will be using it EVERY week!

@Al_Chen_Coda is there any way to get Coda to recognize 2 phone numbers in the same cell and separate those actions?

1 Like

@Josh_Szwarga Yes! I just updated the sample doc in my original post. The formula in the “Click-to-call” column uses the FormulaMap() and Split() functions to create separate links for each number listed in the “Phone number” column.

FYI instead of having a column of numbers you can click to call, you can also add in a button to make the doc feel more like an app (as shown in the template).

1 Like

@Al_Chen_Coda any functionality with opening up my phone’s messenger app when clicking the link or pushing the button?

(Really like the multiple phone number trick)

Yes!

Instead of tel: use sms:

You can even put together a message to auto-load in the message section. Let’s say you have a “First Name” column:

Concatenate("sms:",thisRow.[Phone number],";?&body=Hi%20",thisRow.[First Name],"!%20")

This results in: "Hi Ben! "

The %20 is code to add a space between characters.

4 Likes

I thought it might be sms and tried it after posting…sure enough! Thanks for the tips on auto-loaded messages. That’s a perfect solution for my needs.

Now just trying to solve the the logic of multiple numbers and choosing which one the button uses…:thinking:

hi @Al_Chen_Coda, the FormulaMap works fine if one works with the hyperlink. Is there a way we can use the button and select the number of our choice? I guess @Josh_Szwarga also looked for a solution like this, I guess this is a out of reach for the moment, right?

hi @benblee, the sms logic works fine for me, but I do not see how you can prefill the SMS message with the body text as you propose it. I used the EncodeForUrl() to trework the text. Can you provide a bit more details on how you see this working? thx, christiaan

Can you post the formula you’re using here?

When the text message client opens, it should pre-fill the message, but the last time I tested this was on an older Android version.

sure:

Concatenate(Hyperlink("sms:" + thisRow.[phone number],thisRow.[phone number]),"?&body=Hi%20",thisRow.Name,"!%20",thisRow.[encode for url])

Does this make sense to you?

You couldn’t do this with a button directly, but you could add another column with a select list that let’s you pick the number you want to call. Then when you click the button to call, it would call the number you selected in the select list.

1 Like

thanks @Al_Chen_Coda, so in two steps and with an IF statement or a SwitchIf. In case there is only one number, this number should automatically be preselected.

1 Like

For your formula, the hyperlink is working only for the phone number and then excludes the body text. This needs to be one full hyperlink to work.

Concatenate(
  "sms:",
  thisRow.[phone number],
  "?&body=Hi%20",
  thisRow.Name,
  "!"
).Hyperlink()

You also don’t need to encode URL if you’re including it manually. If you decide to add it, you can do that at the hyperlink part of the formula and you can also remove all the %20 manually added parts.

4 Likes

thanks @BenLee, I’ll have a look tomorrow morning and let you know something!

hi @benblee, it works great. so easy once you understand that the complete string has to a hyperlink. Thx!

1 Like