question

Sean avatar image
0 Likes"
Sean asked Felix Möhlmann commented

How to get object item using queryItems?

Hi,

I had already used queryItems to acquire item, but how to change it to object value? For example, I want to get "FloorStorage1/product" instead of "FloorStorage1>variables/bays/1/levels/1/slots/1/slotItems/1".

Another question, what difference between Storage.System.queryItems() and Storage.System.findItem()

?find-item.jpg

FlexSim 22.1.3
finditem
find-item.jpg (191.5 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
0 Likes"
Joerg Vogel answered Felix Möhlmann commented

It is "item" instead of "slot". See here.

queryItems returns an array of all matching conditions.

findItem returns first found item.

· 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 ·

Also note that 'queryItems()' returns an array Storage.Slot.Item values. To get a reference to the actual flow item object, you have to use the '.item' property.

1658744743514.png

2 Likes 2 ·
1658744743514.png (14.4 KiB)

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.