FlexSim - FlexScript Error Question with Address Scheme

FlexSim - FlexScript Error Question with Address Scheme

king_ki_f
Not applicable
51 Views
1 Reply
Message 1 of 2

FlexSim - FlexScript Error Question with Address Scheme

king_ki_f
Not applicable

[ FlexSim 20.0.2 ]

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?

0 Likes
Accepted solutions (1)
52 Views
1 Reply
Reply (1)
Message 2 of 2

allister_wilson
Not applicable
Accepted solution

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"