The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
[Windchill root]\codebase\wt\clients\library\api \index.html
This will helps answer a lot of questions such as this one it also allows you tet get and set much more(need date, Description and etc.)
Also you can place the number in a task after you implement the above posted code. The power point attached walks you through how to do this on a CR but can be followed for CN\CT also. This may help give you some good ideas or jumping off points for your need.