Jump to content

Phone Number Formatting


Recommended Posts

  • 3 months later...

Sorry, just noticed that this is sporadic and not only for work numbers. I can't seem to figure out any rhyme or reason as to which ones are formatted incorrectly.

 

OS X's Contacts API pre-determines the formatting of the phoone numbers when they're provided to Alfred. It looks like the Contacts API changed in recent times, where it previously didn't save formatting but now does, hence the different formatting you see for various pieces of information or contacts.

 

In my experience, updating a contact's details in Address Book and saving again will update it to include formatting when the data is fed through to Alfred. :)

 

Cheers,

Vero

Link to comment
  • 3 months later...
In my experience, updating a contact's details in Address Book and saving again will update it to include formatting when the data is fed through to Alfred. :)

 

alas, my experience is not consistent with yours; changing a contact's information - like deleting and re-entering the phone number - has no effect on this problem for me.

 

(i'm also using the app no longer called Address Book, but now called Contacts, under OS X v.10.8.5.)

 

is there something i need to do so the data will be "fed through" to Alfred anew, and not read from some cache somewhere?

 

thanks...

 

Ian

Link to comment

same problem...though i'm not sure i've seen a correctly-formatted phone number in Alfred in quite some time. i've tried Vero's suggestion of editing the contact; that hasn't helped in my case. a fix would be appreciated. phone numbers are much harder to decipher without formatting.

 

i'm running the latest version of Alfred, with the Powerpack (family license), under OS X v.10.8.5.

 

thanks,

 

Ian

Link to comment
  • 2 weeks later...

Here is a screenshot of the difference betwwen phone number formatting in Address Book, and in Alfred, not really easy to read !

 

[Admin: Merged a few threads together on this topic]

 

As I said above, and as Andrew also explained previously here, Alfred shows phone numbers as Contacts.app gives them to him, so if you save a contact with a particular format, it will show that format.

 

We have made a note to investigate further to see whether we can make Alfred format phone numbers beyond what Contacts provide, so this may change in the future :)

Link to comment
  • 7 years later...
On 10/24/2013 at 11:00 AM, Vero said:

As I said above, and as Andrew also explained previously here, Alfred shows phone numbers as Contacts.app gives them to him, so if you save a contact with a particular format, it will show that format.

With all due respect, that is not my experience at all. And I know this is an old thread, but Alfred is still, now, eight years after my original post, presenting all phone numbers to me without any kind of formatting while all of those same phone numbers are correctly formatted in the Contacts app.

 

Maybe things are different when running the U.S. version of macOS as against the U.K. version?

Screenshot 2021-03-04 at 8.05.31 PM.png

Edited by Samādhi
Link to comment
9 hours ago, Samādhi said:

With all due respect, that is not my experience at all.

 

Yes, it is. I'm afraid you just misunderstood what Andrew and Vero said. When they said "format", they didn't mean the format Contacts.app is displaying, they meant the one you used when you entered the number.

 

Neither the prettily-formatted numbers Contacts.app shows nor the functions used to format them are available to 3rd-party applications. Applications using the API, like Alfred, aren't given the pretty numbers, they get exactly what you typed into Contacts.app. So the reason you're seeing 5552961234 in Alfred is because that’s literally what you typed into Contacts.app (even though it probably displayed it differently).

 

In order to get properly-formatted phone numbers in 3rd-party applications as well as Contacts.app, you have to format them manually when you enter them into Contacts.app (including country code :().

 

It's stupid, but that's how Apple has made it.

Edited by deanishe
Link to comment
3 hours ago, deanishe said:

It's stupid, but that's how Apple has made it.

 

It's also worth mentioning that since the original thread in 2013, Apple have subtly but opaquely changed how phone numbers (and other Contacts data) are handled in almost every macOS version. As such, trying to outsmart the OS formatting while supporting all macOS versions and formatting in every country's own format is a wild game. For this reason, presenting the results in the vanilla form you entered them in is the most sensible option at this time. 

 

Keep in mind that if you have actions associated to your phone numbers, e.g. if you have a contact action set so pressing return on the contact uses the tel:// URL scheme to start a call, this will work even if the formatting is less visually pleasing than you'd like :)

 

Link to comment
13 hours ago, deanishe said:

 

Yes, it is. I'm afraid you just misunderstood what Andrew and Vero said. When they said "format", they didn't mean the format Contacts.app is displaying, they meant the one you used when you entered the number.

Oooh. Well that's even better than Alfred doing what I thought Andrew and Vero were saying it did. This way I can enter my preferred format of 123.456.7890, Contacts can change it to (123) 456-7890, and I can see it the way I want it to appear in Alfred.

 

I just have to remember how all this works so I'll remember to bother to include the periods when I enter phone numbers.

 

Thank you, deanishe. And Vero, for the note on actioning numbers. Great stuff.

Link to comment
8 hours ago, Samādhi said:

I just have to remember how all this works so I'll remember to bother to include the periods when I enter phone numbers.

 

Bear in mind that Contacts.app sometimes changes the format it’s showing while you’re typing. If you literally type "123.456.7890", that should be what shows up in Alfred, regardless of what Contacts.app does to the number while you're entering it.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...