Which query to get an object whose label value is included in an array ?

Which query to get an object whose label value is included in an array ?

NicolasMembrez
Not applicable
14 Views
2 Replies
Message 1 of 3

Which query to get an object whose label value is included in an array ?

NicolasMembrez
Not applicable

[ FlexSim 22.2.4 ]

QueryChoixMultiple.fsm

the token has a label PossibleDest_Str. We construct a label PossibleDest_Array based on the first one.

The values of this array are the reference of the possible destinations. The size of this array can be between 1 and n.

1685111740243.png



The queues have a label "NoLocal" which is the reference of the destination.

1685112044357.png


Which query to get an object whose label value is included in a string or in an array ?

1685111681713.png

The yellow box have to pull the yellow queue (1-101)

The green box have to pull the green queue (1-102)

The blue box can pull the yellow or the green queue because of (1-101,1-102)


Thanks a lot in advance

Accepted solutions (1)
15 Views
2 Replies
Replies (2)
Message 2 of 3

carter-walch
Not applicable
Accepted solution

Hi @Nicolas M25 ,

querychoixmultiple.fsm

We can accomplish this query by using the SQL IN function. Documentation on SQL commands supported by FlexSim can be found here. It allows us to filter the destinations as long as they are IN the provided list. (example: WHERE NoLocal IN (1-101,1-102) could go to either location)


Because Blue flowitems can go to queue1 or queue2 (1-101,1-102), the ORDER BY allows us to distribute blue boxes between both destinations, instead of always going to the first queue available.

1685118002408.png

Notice how when we do this, yellow goes to queue1, green goes to queue2, and blue can go to either location.


destinations.gif

Hope this helps!

0 Likes
Message 3 of 3

NicolasMembrez
Not applicable
Thanks a lot, it works !