question

kryczka_17 avatar image
0 Likes"
kryczka_17 asked kryczka_17 commented

assigning labels from the global table (nadanie etykiet z tabeli globalnej)

In the global table, I have two data columns that I want to add as labels to the box generated on the source.

One of them (category) is supposed to change the color of the box.

The second one (KodArtykulu) is only to assign a label to the box.

I have no idea how to do it, I tried writing code, but I don't know how.

Will you help me do this?


W tabeli globalnej mam dwie kolumny danych, które chcę dodać jako labele do generowanego na źródle boxa.

Jedna z nich (kategoria) ma zmieniać mi kolor boxa.

Druga (KodArtykulu) ma jedynie przypisać label do boxa.

Nie mam pojęcia jak mam to zrobić, próbowałam pisać kod, ale totalnie nie wiem jak.

Pomożecie mi to zrobić?

nk.fsm

FlexSim 20.2.3
global tablelabels
nk.fsm (55.1 KiB)
· 2
5 |100000

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

Jacob W2 avatar image Jacob W2 ♦ commented ·
Hi @kryczka_17,


Are you wanting the items to go sequentially through the table from 1-13 and have the label values set from the table that way, or are you trying to randomly assign a value between 1-13 and then use that value to set the color and label of the item?

0 Likes 0 ·
kryczka_17 avatar image kryczka_17 Jacob W2 ♦ commented ·

Values can be assigned randomly as well as sequentially, it doesn't matter. What I care about is that a box is generated on the source with two assigned labels corresponding to rows from the global table. The "Kategoria" column is to assign a label on the generated box and change its color depending on the value. The "KodArtykulu" column is only to assign a label on the box with the value from the global table. For example, on one box there is to be a label KodArtykulu-327, Kategoria-1 (data from a row from the table)

0 Likes 0 ·

1 Answer

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

You can do this through trigger options ("On Creation" would be the go to choice I'd say). First the row from which the values will be taken is determined (in this case randomly). Then that value is used to write the other to values to the item.

1699518466403.png


1699518466403.png (26.6 KiB)
· 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.

kryczka_17 avatar image kryczka_17 commented ·
Thank you very much!
0 Likes 0 ·

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.