question

ahmedmedhat avatar image
0 Likes"
ahmedmedhat asked Andrew O commented

Global Table lookup using SKU

I am trying to assign the processing time to each product according to its unique SKU code through this global table shown below, but every time I use the Global Table lookup option it gives me an error says Flexscript exception: 5681 is not a valid row name for Global Table and so on for each SKU code number.

Can someone please help out?

1676836110699.png 1676836117186.png

FlexSim 22.1.0
global table lookup
1676836110699.png (8.7 KiB)
1676836117186.png (114.4 KiB)
· 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.

Andrew O avatar image Andrew O commented ·

Hi @ahmedmedhat, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

The row names are Product 1, Product 2 etc...

You should use getRowByKey for the row.

We encourage students to refer to the online manual and tutorials to find information that is readily available.

· 7
5 |100000

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

ahmedmedhat avatar image ahmedmedhat commented ·
no it's not working, it doesn't give me errors any more but still the flow items pass by the processor without being processed at all. Also I noticed that your code line doesn't include any reference of the "Time" column.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ ahmedmedhat commented ·

That's because that's the expression you use for the row. Check your data types.

Alternatively you can use getValueByKey to write a single expression for the value in the process time field (don't use the lookup trigger template)

0 Likes 0 ·
ahmedmedhat avatar image ahmedmedhat Jason Lightfoot ♦♦ commented ·
can you please write the code for this function and tell me how and where to place it exactly? any visual aid would be very helpful as well
0 Likes 0 ·
Show more comments