question

CSN avatar image
0 Likes"
CSN asked Ryan Clark commented

Question about Storage.system.queryItems

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

FlexSim 22.0.0
queryitems
· 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.

Ryan Clark avatar image Ryan Clark commented ·

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

1 Answer

·
Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

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.

· 3
5 |100000

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

CSN avatar image CSN commented ·

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 0 ·
Felix Möhlmann avatar image Felix Möhlmann CSN commented ·

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

1 Like 1 ·
1642576667192.png (52.2 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Felix Möhlmann commented ·
Thanks Felix.
0 Likes 0 ·

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.