

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Format num into string (num+special character)
Hello,
i have a quick question with regard to formating a field that contains numbers and or numbers+special characters into one format of my choice through script/data editor:
Status Quo (problem):
row_num | field1 |
1 | 0000000000 |
2 | 00-000-0000/0 |
... | ... |
Target (solution):
row_num | field1_new |
1 | 00-000-0000/0 |
2 | 00-000-0000/0 |
... | ... |
How can i achive this?
Thank you in advance.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
You can try this :
=left(keepchar(champ1,'0123456789'),2) & '-' & mid(keepchar(champ1,'0123456789'),3,3) & '-' & mid(keepchar(champ1,'0123456789'),6,4) & '/' & right(keepchar(champ1,'0123456789'),1)
Kind regards,
Théo ATRAGIE.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Assuming the values in field1 are strings that always consist of ten digits (or null/empty) you could do this:
left(Field1,2)&'-'&mid(Field1,3,3)&'-'&mid(Field1,6,4)&'-'&right(Field1,1)
The resulting field will be a text field with your desired format.
EDIT: Yes of course, use keepchar(Field1,'0123456789') as suggested by @theoat - I should have seen that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey,
You can try this :
=left(keepchar(champ1,'0123456789'),2) & '-' & mid(keepchar(champ1,'0123456789'),3,3) & '-' & mid(keepchar(champ1,'0123456789'),6,4) & '/' & right(keepchar(champ1,'0123456789'),1)
Kind regards,
Théo ATRAGIE.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That worked out pretty well. Thank you!
