question

Raul Vazquez avatar image
0 Likes"
Raul Vazquez asked Raul Vazquez answered

Push to list using code and fixed resource

push-to-list.jpg

Hello team,

Im using a fixed resource in order to do a replenishment array, i used to use a token and work welI

but now I need to send the information to a list called work with that, but know I need to send the information to a "list" called "Lista Surtido" in the same fixed resource.... I understood that is only needed to change

Part_Number_Needed.push(Processtype);

Part_Number_Needed.push(Destino);

To

List("Lista Surtido").push(Destino);//here is the issue , I m missing something?

List("Lista Surtido").push(Processtype);//here is the issue , I m missing something?

but once I do that, does not work...Im missing something?

please see below the code that are in the label "Replanishment List" in the fixed resource "LoadBinesandCart_1_2_4" and the flexsim model attached...

/**Custom Code*/ Object current = param(1);
treenode activity = param(2);
Token token = param(3);
Variant assignTo = param(4);
string labelName = param(5);
treenode processFlow = ownerobject(activity);


int Total_In_Connections = current.as(Object).centerObjects.length;
Array Part_Number_Needed = [];

for (int x = 1; x<=Total_In_Connections; x++)
{ Object Destino = current.as(Object).centerObjects[x].inObjects[1];

if (Destino.Inventory_Tote<= Destino.MOQ)

{

int Processtype = Destino.Processtype;

//Part_Number_Needed.push(Processtype);

//Part_Number_Needed.push(Destino);

List("Lista Surtido").push(Destino);//here is the issue , I m missing something?

List("Lista Surtido").push(Processtype); //here is the issue , I m missing something?

//Part_Number_Needed.push(Destino);

} else

{

}

}

return Part_Number_Needed;

Note: Fixed resource "LoadBinesandCart_1_2_5" work in original way... the array "lista de surtido" and the idea is to use a push to list instead of it, push-to-list-model.fsm

or if you can send me a model using push to list with code, Ill appreciate...

thanks for the time

Regards!

FlexSim 19.2.0
codepush to listreplanishment
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

·
Raul Vazquez avatar image
0 Likes"
Raul Vazquez answered

push-to-list-model-1.fsm

Hello I fixed using an external global list, please see model for reference...

Thanks a lot..


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.