question

Howard avatar image
0 Likes"
Howard asked Jeanette F commented

Issue with label at combiner not update new label in On Exit trigger

I want the combiner to combine Type 1 and Type 2 box and then assign new label of Type = Type 5 and ItemName = Product 5.

1715115081986.png

I used On Exit trigger on the combiner but it doesn't update the box's label.


Issue - Combiner cannot replace previous label.fsm

FlexSim 24.0.2
combiner
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Howard, was one of Howard's or Jason Lightfoot's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Felix Möhlmann commented

You need to put "Product5" in quotation marks since it is a string.

· 6
5 |100000

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

Howard avatar image Howard commented ·

@Jason Lightfoot

It worked when the box is in Queue9. However, the ItemName label changes from Product5 to Product1when the box moves from Queue9 to QueueIn2.

Here are the Set Label on the Queue9's On Entry trigger:

1715143312449.png


Queue9 label on box:

1715143388003.png

QueueIn2 label on box:

1715143507571.png


I even added the code to Combiner to delete all labels on exit trigger but still has issue.

  1. item.attrs.labels.subnodes.clear();
    1. Delete label on exit trigger? - FlexSim Community

Issue - Combiner cannot replace previous label V0.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Howard commented ·
When the items re-enter QueueIn2, the Process Flow that reacts to this assigns them new values. Add a Decide activity in the Process Flow so that items are only assigned values if they don't already have them.
0 Likes 0 ·
Howard avatar image Howard Felix Möhlmann commented ·

@Felix Möhlmann


I have added a conditional decide in the process flow but it doesn't seems to work.

1715174691248.png

Issue - Combiner cannot replace previous label V1.fsm

0 Likes 0 ·
Show more comments
Howard avatar image
0 Likes"
Howard answered Howard commented

For "Assign Labels: Get Table Data" and "More Steps", should I use the actual name of the item (Item.name) or the label (Item.ItemName)?

1715181184457.png

1715181266109.png

For the product5, if I want to use the actual name, can I match the actual name to the latest "ItemName"?

Issue - Combiner cannot replace previous label V3.fsm


· 4
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·
Personally I'd use the label, but I don't see a reason why the name wouldn't work.

You can of course always change the name according to the label.

Either in a code snippet in a trigger (item.name = item.ItemName) or in a Custom Code activity (token.Item.name = token.Item.ItemName).

0 Likes 0 ·
Howard avatar image Howard Felix Möhlmann commented ·

Let's stick with only using the label as ItemName.

Under the Decide (Has ItemName?) port #2's Assign Labels: Get Table Data (Assign Label).: Get Table Data, I updated "token.Item.name" to "token.Item.ItemName".

1715203903755.png


Under the Decide (Has ItemName?) port #1's Assign Labels: Get Table Data (Assign Label), I updated "token.Item.name" to "token.Item.ItemName".

1715203999939.png

Under More Steps (Decide), I updated the "== token.Item.name" to "== token.Item.ItemName" in More Steps (Decide) in the process flow.

1715203662019.png

I am getting this error.

1715204157854.png


But then, it seems to work if I keep the "token.Item.name" and not update it to "token.Item.ItemName" under the Decide(Has ItemName?) port #2's Assign Labels: Get Table Data.


1715204259463.png


I am a little confused when the token gets assign the "name" and why I cannot use all ItemName as label everywhere in the token.

Issue - Combiner cannot replace previous label V3.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Howard commented ·

The token enters that activity because it does not have the "ItemName" label yet. Here you can't use the label to get the row to then get the label value. I missed that when saying that either would work.

That said, you can avoid even needing to assign the "ItemName" label in Process Flow if you do it directly in the source.

1715205277009.png

0 Likes 0 ·
1715205277009.png (8.5 KiB)
Show more comments