Jump to content
Sign in to follow this  
ezIQchad

Format On Display

Recommended Posts

Hello,

I have been storing phone numbers with the special characters ( ) - and I would prefer to store numbers only and format the data into phone numbers on display.

 

 

I can format one per page, but only the first one.

 

Can anybody help me with this?

 

Thanks
CHAD

Share this post


Link to post
Share on other sites

Thanks for the reply Jan

 

I figured out an approach, but after I got it I realized the pitfalls of formatting on display. (Users like to see the special characters while adding and editing so adding or editing phone numbers without special characters feels wrong from the end user point of view, editing now requires un-formatting and ensuring the user doesn't use special characters, tel: tags like special characters, etc.)

 

My Javascript approach was from a few weeks ago, and when I couldn't get it I abandoned the effort until yesterday... It lacked a loop which is why I was only getting one per page.

 

The approach I used yesterday to get it was a Caspio Calculated Field: this is from memory because I went back to storing special characters...

'('+Left([@phoneField],3)+') '+Left(Right([@phoneField],7),3)+'-'+Right([@phoneField],4)

(even thought I decided not to do this the formula above might be helpful to others.)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...