cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

"Duplicate" tasks

"Duplicate" tasks

When searching for tasks it would be great if you could see the status of the task in the first window (where the results appear). This would be beneficial if you have more than one task against a name but one of them has either been completed or cancelled for example.

1 Comment
PLM-Sylvain.Bailly
Collaborator

Hi,

 

You can do it already.

 

1/ You just need to create a field (for example "STATE_WORKFLOW") which is a single line text. To have a beautiful result, you can use a computed field formula like (adapt my code to your workflow):

(CASE WHEN (STATE_WORKFLOW = 'Created') THEN '<span style="text-align:center; line-height:25px; color:black; background:#efdf00; width:150px; float:left; height:25px;">Created</span>'
WHEN (STATE_WORKFLOW = 'Verification') THEN '<span style="text-align:center; line-height:25px; color:black; background:#efdf00; width:150px; float:left; height:25px;">Verification</span>'
WHEN (STATE_WORKFLOW = 'Maintenance In Progress') THEN '<span style="text-align:center; line-height:25px; color:black; background:#efdf00; width:150px; float:left; height:25px;">Maintenance In Progress</span>'
WHEN (STATE_WORKFLOW = 'Calibration In Progress') THEN '<span style="text-align:center; line-height:25px; color:black; background:#efdf00; width:150px; float:left; height:25px;">Calibration In Progress</span>'
WHEN (STATE_WORKFLOW = 'Active') THEN '<span style="text-align:center; line-height:25px; color:black; background:#00ff00; width:150px; float:left; height:25px;">Active</span>'
WHEN (STATE_WORKFLOW = 'Quarantined') THEN '<span style="text-align:center; line-height:25px; color:black; background:#efdf00; width:150px; float:left; height:25px;">Quarantined</span>'
WHEN (STATE_WORKFLOW = 'Withdrawn') THEN '<span style="text-align:center; line-height:25px; color:black; background:#fc0200; width:150px; float:left; height:25px;">Withdrawn</span>' END)

If you don't want to see this field, you can create a section hidden for everyone except the admins which contains only your field "STATE_WORKFLOW".

 

2/ Use this script every time you perform a transition:

item.STATE_WORKFLOW = item.descriptor.workflowState;

IMPORTANT Note: If a task can be created by an external workfow, add the script "On Create" of the task (Administration > Workspace Manager > Task WS > Behaviors). Like that the field is updated when it is created by an external WF.

 

3/ You just need to add in the task descriptor the field "STATE_WORKFLOW".

 

I hope that the result fit to your need.

 

Cheers,

Sylvain

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

Submit Idea  

Technology Administrators


Autodesk Design & Make Report