Is it possible to format string fields

austiin
Giga Contributor

Hi I have a string field called phone number in a custom application. Im trying to figure out if you can format the field for phone numbers ex.
phone number:     -     -
but when I add this on a template or a default value it returns nothing and the field is empty does anyone know how to do this?

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Austin,



you cannot add format but you can do validation whether hyphen(-) is present 2 times in the value and also at which position.



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

christen_mitche
ServiceNow Employee
ServiceNow Employee

Austin,



Can you use a phone number field type instead of a string?



Using Phone Number Fields - ServiceNow Wiki



Thank you,


Christen


If this solves your issue please Mark Correct. Hit Like or Helpful if you find the response helpful.


Ankur Bawiskar
Tera Patron
Tera Patron

Hi Austin,



Any update on this?


Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.



Regards


Ankur


Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader