Post batching can I use batched label array to query pull request from list?

Post batching can I use batched label array to query pull request from list?

jkhedekar
Enthusiast Enthusiast
247 Views
3 Replies
Message 1 of 4

Post batching can I use batched label array to query pull request from list?

jkhedekar
Enthusiast
Enthusiast

I am batching 3 tokens. The batched qty can be 1,2 or 3. After batching I release a single token since I want to use it to run in a subflow. Post that I have a pull function that pulls from a list. So I am batching based on a label called  destination. So I can easily use WHERE destination = puller.destination. However, after that I have label called Initialdestination, which during batch I make it an array so post batching it looks like ["destination1", "destination2", "destination3"]. I want to use an if else in Pulls query section where I say.

WHERE destination = puller.destination AND IF puller.batchedqty > 1 BEGIN Initialdestination == puller. Initialdestination[1] ... and so on

Is it possible to do something similar?



Flexsim version: 23.0

0 Likes
248 Views
3 Replies
Replies (3)
Message 2 of 4

moehlmann_fe
Advocate
Advocate

If the goal is to pull one entry for each initial destination value, then use three separate tokens. If the goal is to pull something that matches any of the values in the array you can use "WHERE Initialdestination IN puller.Initialdestination"

0 Likes
Message 3 of 4

jkhedekar
Enthusiast
Enthusiast

Yeah the problem is not if I were to pull any. But I want to pull the the same token which has a unique ID label. So if I am batching 2 tokens which now is converted to 1 with unique ID label as an array [232,543]. I want to then pull 2 labels from the list with the same unique ID. So required and requested pull qty is token.batchedqty which is a label to see how many have been batched. 

0 Likes
Message 4 of 4

moehlmann_fe
Advocate
Advocate

If the IDs are unique then you can still use "WHERE Initialdestination IN puller.Initialdestination". It would only have been an issue if the same value can appear multiple times because then the query could pull "232" twice instead of "232" and "543".

0 Likes