• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Looping Through QueryResult From Database

Status
Not open for further replies.

Mwamba

Forum User
Basic Certified
Joined
Sep 20, 2017
Messages
81
Reaction score
12
I have tried modifying the Predictive Dialer example to dial multiple numbers in the database.
upload_2018-1-12_15-51-0.png

As you can see from the example above I am initializing the index to 0 in the first Variable Assignment box.
In the second Variable Assignment box I create a variable that stores the length of the QueryResult.
In the Increment VariableBox, I increment the index variable
There is a bug in my application that I am unable to fix, the application only dials the first number in the QueryResult and does so continously. It does not dial the other numbers. Can someone show me an example of how to use the for loop, I did not find one when searching online.
 
Hello @Mwamba,

How are you getting the number to call from the QueryResult table? You need to use the CFD Function "GET_TABLE_CELL_VALUE" as follows:
GET_TABLE_CELL_VALUE(getNextNumber.QueryResult,callflow$.Index,0)

Kind regards.
 
Hello @Mwamba,

How are you getting the number to call from the QueryResult table? You need to use the CFD Function "GET_TABLE_CELL_VALUE" as follows:
GET_TABLE_CELL_VALUE(getNextNumber.QueryResult,callflow$.Index,0)

Kind regards.

Yes I am, however I am using project variables as follows,
GET_TABLE_CELL_VALUE(getNextNumber.QueryResult,project$.Index,0)
However the index does not increment
 
Can you add a Logger component to log the values of the variables? Then check these logs from the 3CX Queue Manager log file.

In the log you will also see the database query result, so you can also check if the rows have the value they should have, or they all have the same numbers...
 
Ok, thanks I will
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,620
Messages
748,856
Members
144,733
Latest member
julian1234
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.