Lists Query using Puller.[label] vs token.[label]

Lists Query using Puller.[label] vs token.[label]

zbarachki
Enthusiast Enthusiast
16 Views
5 Replies
Message 1 of 6

Lists Query using Puller.[label] vs token.[label]

zbarachki
Enthusiast
Enthusiast

[ FlexSim 22.2.2 ]

Hi,

When pulling from a list, I have mostly been using WHERE ____ = token.[label]
However, I recently got a few errors and noticed that if I changed it to WHERE ___ = Puller.[label], then the query worked perfectly.

Why is it that the token reference worked in some cases? How can I find out what the difference might be between these lists? I would prefer the token reference to work because that is the default action when writing a query, not that typing Puller is any harder. Just curious.

0 Likes
Accepted solutions (1)
17 Views
5 Replies
Replies (5)
Message 2 of 6

JordanLJohnson
Autodesk
Autodesk
Accepted solution

It is always correct to use "WHERE val = Puller.LabelName", and I'm fairly confident that it is never correct to use "WHERE val = token.LabelName". In fact, I'm somewhat surprised that it works for you in certain cases. I recommend you always use Puller.

As for why you use "puller" and not "token" in a list query, the quick answer is that you can make any node the puller, including a token, a Queue, a TaskExecuter, etc. Since anything can be the puller, it doesn't make sense to assume that "token" is the puller.

.


Jordan Johnson
Principal Software Engineer
>

0 Likes
Message 3 of 6

zbarachki
Enthusiast
Enthusiast
@Jordan Johnson

Thank you for the explanation. I will begin using Puller from now on, however is the puller defined somewhere in the list settings or activities since you said any node could be a puller?

0 Likes
Message 4 of 6

JordanLJohnson
Autodesk
Autodesk

If you are in Process Flow, the Pull From List activity lets you specify the puller:

1673902118833.png

https://docs.flexsim.com/en/22.2/Reference/ProcessFlowObjects/SharedAssets/PullFromList/PullFromList...

.


Jordan Johnson
Principal Software Engineer
>

Message 5 of 6

zbarachki
Enthusiast
Enthusiast
Thank you for quick responses!
0 Likes
Message 6 of 6

jason_lightfootVL7B4
Autodesk
Autodesk

You can refer to the object to pull as token.labelname directly when it's not part of a query and when token.labelname points to the object to pull or contains an array of objects to pull. This corresponds to the three qualifier types shown two fields above the Puller field in Jordan's image which is marked as "Query / Object / Array".

0 Likes