Traffic Light Attribute Implementation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Traffic Light Attribute Implementation
Hello everybody,
I have a very short question about generating a new attribute including a traffic light. I have created a new integer attribute with the following formula behind:
(state.state == “CANCELLED”) ? 0 : (state.state == “INWORK”) ? 1 : (state.state == “RELEASED”) ? 2 : 3
But when I try to save the changes I get the following warning: "Value entered for Formula is invalid."
What am I doing wrong here?
Many thanks!
- Labels:
-
Windchill Visualization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
((state.state == “CANCELLED”) ? 0 : ((state.state == “INWORK”) ? 1 : ((state.state == “RELEASED”) ? 2 : 3 )))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Still not working ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I guess the == operator can't compare two strings then.
Perhaps try a Business Algorithm to compare them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
for example, this is how it works:
state.state=="INWORK"?1:((((state.state=="20_TS_NOT_VALID")?0:(state.state=="10_TS_FAST_TRACK")?1:(state.state=="RELEASED")?2:3)))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for your solution. It is working well... But I have another question related to this topic. Is there a way to have more than these three colors? For example an additional black color for obsolete documents? And another question ... is it possible to show the traffic lights in the documents table?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The question of more colors in the traffic light, I haven't looked into it further, but it should be possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much but I think this will be to complex.
Related to the new Attribute trafficlight ... Is there a way to hide the title of the attribute in the table like "General Status"?