question

Sakamoto Ko avatar image
0 Likes"
Sakamoto Ko asked Jason Lightfoot edited

SqlQuery - Unknown error occurred

Hi.


I have created a global list with a field using Table.query().

In this model unknownError.fsm, the score field in TEList1 corresponds to this field.


A pull on this list with the query "ORDER BY score DESC(or ASC)" would result in the following error message

time: 5.000000 exception: SqlQuery - Unknown error occurred: 


Creating the TEList2 with similar fields without using Table.query() does not generate this error, even though there is no difference in entries between the two lists.


Is this error due to the fact that I have configured the fields using query?


Thanks in advance.

FlexSim 23.0.14
sql querygloballist
unknownerror.fsm (49.1 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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Since you're using this dynamically in a list I'd recommend you instead create a map of scores keyed on the areaType and opeType.

Map scores;
Array key=["a","b"];
scores[key]=1;

Store that on an object somewhere or recreate it at reset in a global variable based on your GlobalTable lookup.

5 |100000

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