Formatting Server Variables

tmcgowan
Senior Member
Senior Member
Posts: 201
Joined: Fri Nov 25, 2005 1:27 pm
Location: Grosse Ile, MI
Contact:

Formatting Server Variables

Postby tmcgowan » Wed Mar 12, 2014 7:58 am

I have a couple of phone numbers (incoming and outgoing) that are being passed along from HomeSeer, however they are in a value format e.g., 3135551212. I'd like to display them on my web clients in a more traditional phone number format e.g., (313) 555-1212. Is there a command in a text box that will do this for me?

Thanks,

Todd

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Formatting Server Variables

Postby CinemarDave » Wed Mar 12, 2014 10:08 am

Use MLServer built-in Format Variable command along with an Automation rule. If the original number is stored in a variable called {{SourceNumber}} then something like the following

Whenever {{SourceNumber}} changes value then
FormatVariable|{{SourceNumber}}~FormattedNumber~Number~(###) ###-####

Use {{FormattedNumber}} as the new variable.

tmcgowan
Senior Member
Senior Member
Posts: 201
Joined: Fri Nov 25, 2005 1:27 pm
Location: Grosse Ile, MI
Contact:

Re: Formatting Server Variables

Postby tmcgowan » Thu Mar 13, 2014 3:50 pm

Thanks Dave,

Your suggestion worked perfectly!

-Todd


Return to “Homeseer”

Who is online

Users browsing this forum: No registered users and 1 guest