Post

2 followers Follow
0
Avatar

Set Initial Value

How do you set an initial value for existing work items when you first create a new field? I set a default value, but it appears to only apply when it is a new item.

Jen Bran Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Jen,

In order to do that for existing work items you'll have to iterate through existing work items using a scheduled workflow rule. Create a new SWR on the work item level and set it to run once year (or just disable it after it worked). Put in the evaluation criteria $C_CUSTOMFIELDNAME=NULL . In the action update the field based on the same logic that you have for the default value.

Please let me know you you were successful.

Thanks!
Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

The SWR worked great when I put no restrictions on it. For whatever reason it wasn't seeing the field as NULL so it never updated with criteria. Thanks for the help!

Jen Bran 0 votes
Comment actions Permalink