question

Martin B20 avatar image
0 Likes"
Martin B20 asked Joerg Vogel answered

Flexscript Exception: no tables resolved

Dear Sir or Madam,


I am quite new to FlexSim and now I obtain an issue I do not understand. I try to use a query for a global list to make it usable in a custom code. Everytime the triggers containing the code fire, i get the exception notice: FlexScript exception: No resolved tables at MODEL:/Planned_Orders>variables/entrytrigger (the trigger can also be the on message trigger)

I have seen some questions with comparable issues, but I dont have any Idea how to solve the problem.

Here is what I try to do:

I want to use the list Planned Orders, where every item entering the queue is pushed to. When the condition of my if clause is true (a safety stock downstream reaches a certain level), I want to push a certain amount (order size defined in a global table) onto another list, which then will be used to pull this items off the queue.

I would be very glad if you help me! Thank you very much in advance and best regards

Martin

here is my file:

Order Release.fsm

here is the code I am talking about:

Table planord = Table.query("SELECT * FROM Planned Orders \ ORDER BY OrderNr ASC");
int SFWIP = current.SFWIP;
int SftyQty = model().find("Safety Stock").subnodes.length;
int totalSF = SFWIP + SftyQty;
int critQty = Table("GlobalTable1")[1][1];
int ordersize = Table("GlobalTable1")[2][1];

if(totalSF<critQty)
{
for(int i=1; i <= ordersize; i++)
{
List ("Released Orders"). push (planord[i][1], 0);
}
}


FlexSim 18.1.2
flexsim exception
order-release.fsm (21.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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

Set in query clause Planned Orders in square brackets like

[Planned Orders]

5 |100000

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