[OutSystems UI] DropdownTags - Tags with different colors based on value

Forge Component
(87)
Published on 7 Jul (4 weeks ago) by OutSystems R&D
87 votes
Published on 7 Jul (4 weeks ago) by OutSystems R&D

Is it possible to set a different color for each tag based on value?

Scenario: Machine Learning Model returns label and accuracy values.

The app would get this response and populate a DropdownTags field with tags. Each tag would have a color based on the accuracy, ranging from red to green: red for low accuracy; green for high accuracy. 

Hi Luiz,

If the result comes from a system functionality and not a user interaction why not use just the tag pattern.

Regards,

Marcelo

Hi, Marcelo. 

We can't use it because there will be user interaction. Users will see the tags, and based on the color, remove it. 

Users need to be able to add other tags too. 

The optimal scenario, as I think, is to use just one DropdownTags field. 

If it's not possible, I think I could use your suggestion, splitting ML tags and user tags. ML tags would be displayed using Tag UI Pattern and user tags with DropdownTags.

But I think that would be a UI loss and, maybe, a lot more work to implement. 

What do you think?

Solution

Hi Luiz,

To use the dropdown tags you would have to change it and start using the custom properties of choices with the color you want that option. and than have css for the different colors. For sure this would be the option that would look better on the screen but not the easiest to implement.

Regards,

Marcelo

Solution

Ok, the second route then. Thank you for the help!