ProcessFlow - List Content

ProcessFlow - List Content

zixuan_xiong
Not applicable
50 Views
9 Replies
Message 1 of 10

ProcessFlow - List Content

zixuan_xiong
Not applicable

[ FlexSim 7.7.4 ]

How to obtain the entries and back orders number in a list?

Accepted solutions (1)
51 Views
9 Replies
Replies (9)
Message 2 of 10

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

In Process Flow, the List block will draw a green circle that displays how many entries it has and a red circle that displays how many back orders it has.

157-listentriesbackorders.png

Outside of Process Flow you can use the listentries() and listbackorders() commands to get a reference to the entries or back orders node of the specified list. You would then just need to use the content() command to find out how many there are.

content(listentries(globallist("List1")))

content(listbackorders(globallist("List1")))


Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 3 of 10

zixuan_xiong
Not applicable

Also solved as follow:

treenode current = param(1);
treenode activity = param(2);
treenode token = param(3);
treenode createdToken = param(4);
treenode assignTo = createdToken;
int creationRank = param(5);
string labelName = param(6);
treenode processFlow = ownerobject(activity);

return getstat(getactivity(processFlow, "Inventory"), "BackOrderContent", STAT_CURRENT, current);
Message 4 of 10

zixuan_xiong
Not applicable

listentries and listbackorders are what I want! Thank you!

0 Likes
Message 5 of 10

Matthew_Gillespie
Autodesk
Autodesk

Note: Those commands really only work for global lists. If you are using a Process Flow List activity that uses an internal list you'll need to use your solution since the actual list is buried deep in the process flow structure.



Matthew Gillespie
FlexSim Software Developer

Message 6 of 10

anthony_johnsonT83CM
Autodesk
Autodesk

If you need to get the number of entries or back orders on a list in process flow, you can use the Assign Labels activity, and use the pick option: Activity Stat. Choose the list as the object, and then either Content, or Back Order Content as the stat to get.

Message 7 of 10

tendulkrDJ3YT
Explorer
Explorer

i want to do the same but just for process flow list. this is internal list and not connected to any global list. @Matthew Gillespie @Logan Gold

0 Likes
Message 8 of 10

Jacob_White
Community Manager
Community Manager
@Sachin T,

Your question has been answered already in two of the answers below.

0 Likes
Message 9 of 10

tendulkrDJ3YT
Explorer
Explorer

thank you. But this is not working.

TrackedVariable("ReCircCounter").value=getstat(getactivity(processFlow, "List"), "Content", STAT_CURRENT, current);


I am doing something wrong.


0 Likes
Message 10 of 10

logan_gold
Community Manager
Community Manager

@Sachin T, you can still use the answers that were given by Anthony and Zixuan. In fact, Zixuan's answer uses similar code to the Activity Stat dropdown option from Anthony's answer. Even with an internal list, you still have access to the list's stats using that option/code.

There's probably still a way to do it like in Matthew's answer, except content(), listentries(), and listbackorders() are deprecated now. You would instead use treenode.subnodes.length, List.entries(), and List.backOrders(), respectively. The tricky part would be getting a reference to the internal list in the List resource's tree. It's possible, but using getstat() and getactivity() are easier.

0 Likes