ERROR IN GETTING QUEUE
ERROR IN GETTING QUEUE
(OP)
I keep getting an error because of the GET().
First my code was:
FREE(qTest2)
LOOP i# = 1 TO RECORDS(Queue:Browse:1)
GET(Queue:Browse:1, i#)
IF ERRORCODE() THEN
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
IF ... THEN !Filter -Condition
qTest2.Data = Queue:Browse:1.Data
ADD(qTest2)
END
END
But then it would just skip the whole loop like it wasn't even there, so i wrote it like this:
FREE(qTest2)
i# = 1
LOOP
GET(Queue:Browse:1, i#)
IF ERRORCODE() THEN
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
IF ... THEN !Filter -Condition
qTest2.Data = Queue:Browse:1.Data
ADD(qTest2)
END
i#=i#+1
END
And the message is:
Entry Not Found.
Errorcode is 30
Does anybody know what could cause this error?
First my code was:
FREE(qTest2)
LOOP i# = 1 TO RECORDS(Queue:Browse:1)
GET(Queue:Browse:1, i#)
IF ERRORCODE() THEN
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
IF ... THEN !Filter -Condition
qTest2.Data = Queue:Browse:1.Data
ADD(qTest2)
END
END
But then it would just skip the whole loop like it wasn't even there, so i wrote it like this:
FREE(qTest2)
i# = 1
LOOP
GET(Queue:Browse:1, i#)
IF ERRORCODE() THEN
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
IF ... THEN !Filter -Condition
qTest2.Data = Queue:Browse:1.Data
ADD(qTest2)
END
i#=i#+1
END
And the message is:
Entry Not Found.
Errorcode is 30
Does anybody know what could cause this error?
RE: ERROR IN GETTING QUEUE
If there are 4 rows in the Browse:queue:1 and you try to access the fifth row, it will return an error of Entry Not found. Change your code to ::
CODE
BREAK
ELSIF ERRORCODE()
MESSAGE(ERROR(),ERRORCODE())
BREAK
END
Your first loop code seems fine and the I think the problem is with your filter condition.
Regards
Regards