question

Sri avatar image
0 Likes"
Sri asked Sri answered

Error for missing value in table when it exists.

I am getting the following error. "time: 5.000000 exception: FlexScript exception: no row found for key 5 in col 1 at MODEL:/Tools/ProcessFlow/ProcessFlow/ Record Qty M3_ABC sent to Cust_ Col_ 7>variables/codeNode". A token is writing a value to a global table by reading the row value from a label and checking if the row value exists or not. If it exists, then it enters the value else it creates a row and enters the value. However, it does neither in the code. It keeps giving me this error. I ran the entire model last night and didn't have any errors when I ran it multiple times fior fixing any errors. However, today it started throwing this error when I didn't make any changes in the model.Any suggestions would help. Thank you.

FlexSim 22.2.0
write to global tabletoken labelsrow number
· 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.

Felix Möhlmann avatar image Felix Möhlmann commented ·
Can you show the relevant code and maybe a screenshot of the table at the time when the error occurs?

As a side note: It sounds like you could just use a Statistics Collector in place of a global table. It would do the check for an existing row by itself.

0 Likes 0 ·

1 Answer

Sri avatar image
0 Likes"
Sri answered
Hello, I fixed the error. I created the table again due to another error so now the execution in the tree was first the row calling and then the table creation. Since, Flexsim follows a hierarchy, it gave me that error. Thank you.
· 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.

Happy to hear that. Feel free to change your comment into an answer and accept it, so other can see that the issue has been resolved.
0 Likes 0 ·