question

Jeremy R avatar image
1 Like"
Jeremy R asked Jordan Johnson commented

Invalid SqlDataSource object when querying backorders

When I try and query for backorders of a Global List using List.pull(), I keep getting the following error messages in the System Console

exception: Invalid SqlDataSource object
exception: getquerymatchtablerow - invalid row index

Notably, the query is running successfully and returning correct results, but in the process it also produces the following error message. Additionally, in the model in which I first noticed this, I could successfully query backorders on one of my Global Lists, but not a different Global List, even when running the exact same FlexScript code to query their backorders (unfortunately, I cannot share that full model).


To try and isolate the cause, I've created a test model (backorder query.fsm) with a brand-new Global List. The following is the code that I'm using to test this.

List testList = List("List1");

//Create backorder
testList.pull("WHERE 0", 4, 1, nullvar, nullvar);

//Get all backorders
List.PullResult test = testList.pull("WHERE 1", 4, 1, nullvar, nullvar, LIST_PULL_BACK_ORDERS + LIST_DO_NOT_FULFILL);

return test;


In 18.2.0, the error occurs every single time I run that code from the Script window. In 19.0.0, the error never occurs with that test model. In 20.1.0, the error always occurs at first, but if I open the Global List and click "Apply" it stops happening.


What is causing these error messages? Since the query is otherwise working correctly, is there a way to suppress the error messages?

FlexSim 18.2.3
sqlflexsim 18.2.3backorder
backorder-query.fsm (17.3 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson commented

This looks like a bug. To avoid getting the error message, add a Back Order Queue Strategy.

ORDER BY 1

seems to avoid the issue in this case.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeremy R avatar image Jeremy R commented ·
Unfortunately, this doesn't fix the issue for me in 18.2.0 nor 18.2.3. I'm still getting the exact same error message as before.

However, it does appear to stop the error in 20.1.0.

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Jeremy R commented ·

That is good to know. If you are able to upgrade, please do. We fix many bugs each release, including bugs you may not have discovered yet. The oldest supported release is currently version 21.0. Does upgrading resolve your issue, and if so, can you accept the answer?

0 Likes 0 ·