Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBase Lookup Node in Script Editor

Status
Not open for further replies.

signaldawg

Technical User
Jan 25, 2002
8
US
I am trying to a simple db lookup in a script with 4 nodes(start, db lookup, (succeed)label, and (failure)label. Here is the scenario:
“Inbound call received from 800xxxxxx into ICM. A database dip is done into table (tablename)to match the inbound number with the ANI column in table and should return a true label to ATT_NIC.##########. I keep getting a false and it goes to label ATT_NIC.##########.” The tabel has 4 columns, ID (key), Site, ANI, and type. I want the inbound call to match the record in the table ANI and return a true lable to route to my Irving office. I can't change the key to the ANI column becasue i could have multiple sites with the same ANI. I have tried every possible formula and keep getting one these or 2 msgs:
DB Lookup #57
Key:
False; DBLookup failed. Error 1.
or
False:Expression returned invalid result.
 
Here's the problem:
The DB Lookup node will only search through the Primary Key column in your table. When it finds a patch, the other columns are available to you as variables in the Database.
.[column] object.
My soluiton would be to create your table with the Site Name AND the dialed number concatonated together as the primary key column. Then have the dialed number as your second column, or just parse the primary key value.
If you wanted to, you could create a new variable, then ocncatonate the Call.routingClient with the Call.DialedNumber and you would have your search criteria.

 
After re-reading your email, I realize that my solution is a little off-track. (Plus, I can't spell worth a d@$#)
You should create the primary key of your table to have the Site Name WITH the ANI.
When you do your search, have as many DBLookup nodes as you have sites. Let each DBLookup node search for the caller's ANI at one site.
Use a new variable to store the caller's ANI concatonated with the site name. Concatenate your first site with the callers ANI -
Global.user_var1=concatenate("STLOUIS",Call.CallingLineID)
Then do the DBLookup node with your new variable that has the concatenated contents. If it fails, concatonate your next site with the ANI.
Global.user_var1=concatenate("SACREMENTO",Call.CallingLineID)
Do the DB search again. Do as many DB searches as you have sites. If all the DB nodes fail, the caller's ANI is not in your table.
Remember, the DBLookup node ONLY searches through the table's primary key.
Also, the SQL column names, types and sizes have to match perfectly with the dable definitions in ICM. If not, all of the DBlookups will fail. To ensure your table definition is set up correctly, run a test ot do the dblookup on what you KNOW is in the primary key.

-Todd-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top