question

Stan Davis avatar image
0 Likes"
Stan Davis asked Stan Davis commented

See 'Find Item' Query Result Set

I need to verify the results of a 'Find Item' query by seeing the complete result set. I'm specifically testing the Order By clause. This question regarding the 'Find Slot' activity was asked here..

https://answers.flexsim.com/questions/107224/am-i-able-to-see-a-result-set-of-a-query-from-find.html

However, the accepted answer did not provide a manner to see the complete result set but only the result. Any help would be appreciated. Thanks.

FlexSim 23.1.4
sql queriesfinditem
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

·
Kavika F avatar image
0 Likes"
Kavika F answered Stan Davis commented

Hey @Stan Davis, have you tried the "queryItems" function? This returns an Array of Storage.Slot.Item values that match your specified query.

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

Stan Davis avatar image Stan Davis commented ·

Kavika,

That works. In case this helps someone else, this is what I ended up doing..

Array myarray;
myarray =  Storage.system.queryItems("WHERE PartNo == $1.PartNo ORDER BY AssetQty DESC", 0, token);

Table result =  Table.query("SELECT $2 as item FROM $1", myarray.length, myarray[$iter(1)]);
result.cloneTo(Table("QueryDump"));

Thanks to @Joerg Vogel for the cloneTo solution found here...

https://answers.flexsim.com/questions/52264/how-to-query-an-array.html

Thanks again,

Stan

2 Likes 2 ·

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.