Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Michael.Slowey@lavastorm.Hi, Here is the type of functionality that I use for matching International Telephone Calls to their IDD codes.
You match the IDD to the Telephone Number by length, starting with thel longest IDDs going down the shortest IDDs
using a series of lookups. I've added the ten lookups you would need
Regards
Mick Slowey
mslowey@lavastorm.com
--------------------------------------------------------------------------------------------------------------------------------------
Originally posted by: original21
Hi!! I am new to Lavastorm and I already face my first difficulties.
I have two inputs. The first one contains a column with the receiver of a call. The second one contains the prefixes of the countries. I want to match the receiver with the country. The problem is that the prefix may vary form one to ten digits.
The logic that I have thought about is sth link the following one:
i=10
while 1:found=0 {if left(2:B_NUMBER,i)=1:ToNum then ((1:found=1) and (1:country='1:Member Name')
i=i-1
So, I have also added a column named "found" that has as a starting value the "0". While the value "found" remains zero, I start looking at the i left digits of my receiver until I find the prefix, so it takes the relevant country. If i do not find it , the number of digits decreases by one. The prefixes of the countries are sorted by largest to smallest.
Please help me in which node i have to include this script and the errors that my script may have. Thank you in advance
Attachments:
IDD Matching.brg
IDD Matching.brp