question

Ale avatar image
0 Likes"
Ale asked Ale commented

set color by case on entry trigger

I created a label named "Color" in a source that goes from 1 to 8. I would like to set up a trigger that when it enters queue2 it changes per the define label "Color" 1.jpg . The flow items are still not changing color see attached model color.fsm

Thanks!

Choose One
set color by case
1.jpg (55.1 KiB)
color.fsm (21.7 KiB)
5 |100000

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

Kari Payton avatar image
2 Likes"
Kari Payton answered Ale commented
@Ale

First you need to create the "Type" label on your item. In the process flow I added the label "Type" in create object with a value of duniform(1,8).

Then for each case, input Color.colorname. For example Color.red for red.


screenshot-1.png (217.8 KiB)
· 5
5 |100000

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

Ale avatar image Ale commented ·

@Kari Payton Thanks for the input. I did what you suggested but it gives me random quantities of the colors I set up 1.jpg. I want the colors quantities to be determine by the label Color in the source.

Thanks!

0 Likes 0 ·
color.fsm (24.0 KiB)
1.jpg (31.8 KiB)
Kari Payton avatar image Kari Payton Ale commented ·

@Ale

In this case, I would change the color using process flow. After the unload, add a custom code to change the visual based on the color value and delete the trigger on queue2. 8574-color.fsm

Color.byNumber(token.Color)
1 Like 1 ·
8574-color.fsm (23.8 KiB)
Ale avatar image Ale commented ·

@Kari Payton or @Jörg Vogel I need a quick clarification on this if I use a custom code, set color by case so I can define the colors that I want .What is the correct query to use? I tried to use the query token.item.Color on the value field but I'm getting an error.

Thanks!

0 Likes 0 ·
x5tkt.png (27.4 KiB)
Kari Payton avatar image Kari Payton Ale commented ·

@Ale the difference:

1. token.item.Color - this reads the label from the token label - item - color (process flow)

2. token.Color - this reads the label from the token (process flow)

3. item.Color - this reads the label from the item (3D)

To check, run and stop the model after a few activities. Then click on an object in 3D and check in the quick properties what labels are on the item. If there isn't a label called Color then you must add it. The same can be done in process flow. Click on a token in 2D and check the quick properties for labels associated with that token.

1 Like 1 ·
Ale avatar image Ale Kari Payton commented ·

Got it Thanks!

0 Likes 0 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel edited

Have you tried the Standard Template - Set Color by Case?

Value field: item.Color

then the standard works.

Color.aqua is enough.

color-by-label-color.fsm


· 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.

Ale avatar image Ale commented ·

@Jörg Vogel I did but the flow items are not changing color on enter. and its giving me an error 1.jpg, 2.jpg

0 Likes 0 ·
1.jpg (116.6 KiB)
2.jpg (54.7 KiB)
Joerg Vogel avatar image Joerg Vogel Ale commented ·

@Ale,

I hadn't any problem. I set the label named "Color" on creation and on exit I choose the standard picklist option "set color by case". I changed the value parameter to item.Color and then everything went well.

1 Like 1 ·

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.