question

King-Ki F avatar image
0 Likes"
King-Ki F asked Allister Wilson edited

FlexSim - FlexScript Error Question with Address Scheme

coding-error.pngHello,

I'm trying to create inbound and outbound flow out of my rack. I have assign the Address Schema to a Global Table when I put items into the racks by SKU and now I'm trying to reference the Global Table when I need to pull out items by SKU.

I am attempting to pull the Address Schema out of my table, but when I step through my code the information is incorrect. In the attached image, I'm expecting Address "01-02-01" but for some reason I am getting a "-2" instead. Would someone be able to help me understand what I'm doing wrong please?

FlexSim 20.0.2
sqlflexscript error
coding-error.png (65.2 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

·
Allister Wilson avatar image
1 Like"
Allister Wilson answered Allister Wilson edited

You're running executeCell on the cell, so it's evaluating 01-02-01 as a Flexscript expression.

The result of 1 - 2 - 1 is -2.

Unless you specifically need to execute the cell, just access it normally:

theTable[row][column]

If you absolutely need to evaluate it as Flexscript, you'll need quotes to ensure the expression evaluates to a string:

"01-02-01"
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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