Sort Array

Sort Array

devdatta_d
Not applicable
868 Views
6 Replies
Message 1 of 7

Sort Array

devdatta_d
Not applicable

[ FlexSim 22.1.1 ]

How to sort an array using code/process flow?

0 Likes
Accepted solutions (1)
869 Views
6 Replies
Replies (6)
Message 2 of 7

Jeanette_Fullmer
Community Manager
Community Manager
What is in the Array? Numbers, Strings, pointers? How are you trying to sort? Is there a number in the string or pointer and do you want is smallest to largest by that number?
0 Likes
Message 3 of 7

devdatta_d
Not applicable
An array of items stored in racks. I want to sort the array based on location in racks. For ex. I might have items stored in Rack 1, Rack 2 etc. and in Bay 1 , Bay 2 etc. I want to sort the items so that you items in Rack 1 and Bay 1 then Rack 1 Bay 2 , then Rack 2 Bay 1 and so on.
0 Likes
Message 4 of 7

jason_lightfoot_adsk
Autodesk
Autodesk
Push and pull them off a list ordering by baynumber
0 Likes
Message 5 of 7

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

Here's a link to a previous answer which has the items for picking arranged by aisle and bay.

You could push and pull the items from a list as I think I did in that example.

Alternatively you could put all the items in a table on token and sort by aisle and bay - functionality you get by not using arrays.

0 Likes
Message 6 of 7

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Devdatta D, 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
Message 7 of 7

joerg_vogel_HsH
Mentor
Mentor

You can query an array and ORDER it BY clauses of a SQL.

https://answers.flexsim.com/answers/52265/view.html

0 Likes