Copy workflow status to new column of type hyperlink

  • 17 January 2017
  • 5 replies
  • 17 views

Badge +4

I am trying to copy workflow status into a new column of type ' Hyperlink ', and redirect it to my custom page along with item ID. This is what i tried,

  • Action - Build String, 

                     

As my new column is hyperlink, I am setting the URL to custom page in 'Build String'. Where as in the description I want to show text same as 'Workflow Status' column, to make it easy for users.

  • Action - Update List Column,                      

                     

My list column config,

                      

                            

This is what I am trying to do in the workflow,

                                         

Don't get confused here in first image, I am building the string for the first time and storing it into a workflow variable and using 'Update List Item' action whenever necessary.

The second image is what I am trying before workflow ends, even I tried without 'Build String' action , no luck. 'Build String & Update Item' config action is same as above.

I am not sure, where I am doing wrong. Below is my result in the list, everything works well first time, but the column remains unchanged.

                              

Can someone please help ?


5 replies

Userlevel 4
Badge +12

Hi,

what I understood is to have kind of like a custom workflow column that shows the workflow status and is linked to an URL that you provide.

In the end the default workflow status shows "completed" but your custom status still says "in progress".

This seems correct to me as by the time you set the workflow link the workflow is still "in progress". It's complete once all actions have run and the workflow is closed by the workflow engine.

This way I'd suggest to moderate the workflow status alone, means save your link as "completed" in your last action in your workflow and trust in the workflow to complete itself in the very next second.

What do you think?

Kind regards,

Enrico

Userlevel 3
Badge +9

I was going to suggest the same as ‌.  Just set your custom column status to "Completed" right before the workflow finishes. 

Badge +4

Sorry about the delay.

I am not aware about this, the status will updated to 'Completed'  only after all actions are done and workflow is closed by the workflow engine.

As suggested, modified my custom column in the last action and it worked perfectly. 

There is one case, which won't occur often, if site owner ends workflow manually, 'Workflow Status'  is showing 'Canceled', whereas my custom status is 'Completed'. Is there any way to overcome this?

Thanks a lot.

Userlevel 4
Badge +12

Hmm, if the site owner ends the workflow with the cancel workflow option the status will always be cancelled.

You should check when the site owner needs to end the workflow manually. If he needs to do this from time to time it should be made part of the process, like giving him a review task or something and this way let him end the workflow in a controlled way instead of aborting the workflow. This way the workflow will show "completed" again.

Kind regards,

Enrico

Userlevel 3
Badge +9

You could build a "Cancel Process" workflow.  This would be what the site owner would use to cancel the process.  Within that workflow you could then add a step to update your new status column to "Cancelled". 

Reply