12-14-2010 08:31 AM - edited 03-16-2019 02:25 AM
Has anyone written an LDAP expression that would add a digit in front of the users extension number during the import? I need to import a few hundred users with a variety of 10 digit numbers and have them end up in Unity as a 5 digit extension. The issue is that the 5th digit (xxx-xxX-xxxx) is not the same in the 10 digit telephone numbers as the leading digit in the extension number.
So - I tried various expressions and can easily get the last 4 or 5 digits during the LDAP import but cannot figure out how to insert or replace that digit to become the new first digit of the extension number - seems like it's all or last or nothing - can't get a formula to work.
Example ---
Current telephone number is 734-335-1234 (have multiple exchange codes so 335 is an example but others would be 592 - 596 - 324 etc)
Current 4 digit extension is 1234
New 5 digit extension is 61234
Am trying to create an LDAP expression that would either import 1234 and insert a 6 at the beginning or
import 51234 and replace the 5 with the 6
Before I spend a few hours manually entering all the extension numbers (or more likely import last 4 digits and type the leading digit) on all these guys I thought I would see if anyone has come across this and if there is a solution.
Thanks,
Les
12-14-2010 10:50 AM
Les,
A thought for you. I don't know that you're going to be able to work a regular expression too easily into the logic that you may need to convert numbers. However, it would appear that you may have some logic that you could use to manipulate the data in advance and then import the info via BAT. For example, I see this option may be more flexible and/or easy to deal with:
Use the DID as the primary extension but compile a list of the 5 digit manipulated extensions and add them as alternate extensions in BAT. That way, the alternate extension would allow users to hit VM based on the manipulated extension and you don't have to try and write up a regular expression that may or may not work the way you need it to.
Just a thought. I'd go that route personally.
Hailey
Please rate helpful posts!
12-15-2010 02:40 PM
David -
Thanks for the input and suggestion. You are right - it's likely a BAT file that I need. I tried a lot of different expressions without any luck so I guess I'll have to go this route. Appreciate your guidance.
Regards,
Les
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide