Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow with colors

2 REPLIES 2
Reply
Message 1 of 3
tray1
406 Views, 2 Replies

Workflow with colors

I would like a field which is a coloured tile, the colour of the tile changes depending on the workflow state the item is at in the workflow.

I think this is a computed field. I have tried to copy some code I have seen and change it. This is the code I am trying but it errors. I see from the scripting page that descriptor.workflowState should give me the current state of a workflow. that is where I get stuck. I can't sucessfullt use descriptor.workflowState and I don't know if there is a better value I can use to compare against.

This is what I have so far......

Any pointers?

 

VAR STATE = descriptor.workflowState;
(CASE WHEN (STATE = DOCUMENT_CREATED) THEN '<span style="text-align:center; line-height:30px; color:yellow; background:yellow; width:50px; float:left; height:25px;">YELLOW</span>' WHEN (STATE = INSTALLATION_ARRANGED) THEN '<span style="text-align:center; line-height:30px; color:cyan; background:cyan; width:50px; float:left; height:25px;">CYAN</span>' WHEN (STATE = INSTALL_STARTED) THEN '<span style="text-align:center; line-height:30px; color:red; background:red; width:50px; float:left; height:25px;">RED</span>' WHEN (STATE = INSTALL_STARTED_ERRORS ) THEN '<span style="text-align:center; line-height:30px; color:red; background:red; width:50px; float:left; height:25px;">RED</span>' WHEN (STATE = INSTALL_COMPLETE) THEN '<span style="text-align:center; line-height:30px; color:GREEN; background:GREEN; width:50px; float:left; height:25px;">GREEN</span>' WHEN (STATE = SIGN_OFF) THEN '<span style="text-align:center; line-height:30px; color:blue; background:blue; width:50px; float:left; height:25px;">BLUE</span>' ELSE '<span style="background:white; color:white; width:50px; float:left; height:25px;">WHITE</span>' END )

2 REPLIES 2
Message 2 of 3
tray1
in reply to: tray1

OK so now from another post http://forums.autodesk.com/t5/Autodesk-PLM-360/Workflow-State/m-p/4299260/highlight/true#M1714 I read computed fields only support SQL and HTML not Javascript

 

So do I create a script that finds descriptor.workflowState then put that value as a field in the item. then compare that field with my case from above?

Message 3 of 3
jpiggee
in reply to: tray1

Hi Tim,

 

Yes, you would have to pull the value over from the workflow to the item tab (hidden / admin section would work great for this) them you could use this field in your computed filed to report on.

Joseph Piggee
Fusion 360 Administrator
TPI Composites
jpiggee@tpicomposites.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report