Question about Storage.system.queryItems

Question about Storage.system.queryItems

supportPHJ4A
Enthusiast Enthusiast
155 Views
5 Replies
Message 1 of 6

Question about Storage.system.queryItems

supportPHJ4A
Enthusiast
Enthusiast

[ FlexSim 22.0.0 ]

Hi,

I've been testing the Kiva scenario. I have used the following FlexScript to find all items in the FloorStorage.But I could only find one item (actually there were five in FloorStorage ).

1642487838642.png

When i redefine the query parameter inside 'find Item'activity (From [Any Item] to [WHERE item.slot.slotItems.length > 0 ]). It can find all items correctly.

1642487882284.png

I'm so confused about this .Please help.

Thanks a lot.


StorageQueryFlagsAllItems_V2022.0.fsm

0 Likes
Accepted solutions (1)
156 Views
5 Replies
Replies (5)
Message 2 of 6

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

I'm pretty sure the Find Item activity only finds one item by default - there is a clue to this in the manual where it states that when there is a list of queries it will stop evaluating them when the first item is found.

Message 3 of 6

supportPHJ4A
Enthusiast
Enthusiast

Sorry, I may not express clear.

The problem is not the Find Item activity.It's that when I modify the Find Item query, the label activity(allitems) gets a different value.

And I get the allitems label value from the following FlexScript :

1642554520222.png


Please see the model for details.

storagequeryflagsallitems-v2022.fsm


Thanks! I would provide any extra info if needed.

0 Likes
Message 4 of 6

moehlmann_fe
Enthusiast
Enthusiast

I could also replicate the issue without using the Find Item activity. Simply calling queryItems with the "Limit1" flag and an empty query string (which is what Find Item does, at least the manual says so) will cause the next queryItems command with an empty string to also only return one item.

It seems like a bug where the empty query strings somehow lead to the flag not being properly cleared.

1642576667192.png

Message 5 of 6

jason_lightfootVL7B4
Autodesk
Autodesk
Thanks Felix.
0 Likes
Message 6 of 6

ryan_c10
Not applicable

Hi @CSN, 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