question

Dirk Boumans avatar image
0 Likes"
Dirk Boumans asked Jeanette F commented

item StayTime in Storage System

Hi,

Is there a way to query items in a storage system by the the time they are stored in the storage objects? I want to create a shipping list of items based on item type and want to select items which are stored for more than x amount of time. All items are randomly stored across several floorstorages. I know how to use find item and query on item type but I can't figure out how to query the staytime.

Regards Dirk

FlexSim 23.0.6
querystorage systemstaytime
5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jeanette F commented
  1. Storage.system.queryItems("SELECT item, time()- get(stats_lastmovetime(item.item)) AS Age WHERE Age>hours(5)").as(Array).as(Table).cloneTo(Table("GlobalTable1"))
· 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.

Steven Hamoen avatar image
0 Likes"
Steven Hamoen answered Dirk Boumans commented

Hello @Dirk Boumans If you would create a token when an item is entering the storage system and you put the token on a list with the age field and a pointer to the item you have your list immediately without any other actions required. And you can easily query everything older than a certain age.

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