question

Nicolas Mbz avatar image
1 Like"
Nicolas Mbz asked Nicolas Mbz commented

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

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

FlexSim 22.2.4
sql queryuser commandpull query
1685111681713.png (201.3 KiB)
1685111740243.png (140.1 KiB)
1685112044357.png (149.6 KiB)
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

Carter Walch avatar image
0 Likes"
Carter Walch answered Nicolas Mbz commented

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!


1685118002408.png (33.2 KiB)
destinations.gif (42.4 KiB)
· 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.

Nicolas Mbz avatar image Nicolas Mbz commented ·
Thanks a lot, it works !
1 Like 1 ·