question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked CH L answered

Query on list is not working as intended.

I am trying to get the Qty label value using the Query as shown in below image. it is throwing error.

Below code is throwing error

  1. int x=2;
  2. Table.query("SELECT Qty FROM ItemList1.x")[1][1];

Below code is not throwing error

  1. Table.query("SELECT Qty FROM ItemList1.2")[1][1];

ListError.fsm


FlexSim 20.1.3
flexsim 20.1.3list
1596986109085.png (45.1 KiB)
listerror.fsm (31.9 KiB)
· 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.

1 Answer

CH L avatar image
0 Likes"
CH L answered

x should be in string format.

Table.query("SELECT Qty FROM ItemList1." + x)[1][1]

5 |100000

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