TASK_ID in PSI

S

Stephan Steiner

Hi

Back with PDS you could insert a line in the middle of an existing project
by setting its TASK_ID (corresponding to the line number) to the appropriate
line.. upon sending the request, project server 2003 would then move the
task which was at that position one position down (and the same for every
other task).. that was good because you had no means to move around tasks
one written.

With PSI we have the whole project in a ProjectDataSet so I'm wondering if
there's a recommended way of doing it.. will the DataSet automatically
adjust TASK_IDs when I insert a new row with a TASK_ID that matches an
existing one, will the Project Server 2007 do it, or should I rather change
the TASK_ID of all the tasks first, then insert my row, and do the same for
every subsequent task I'm creating?

Regards
Stephan
 
S

Stephen Sanderlin

I've never tried to do this, but I would recommend that you review the
following documentation in the SDK:

.. ProjectDataSet.TaskDataTable.AddTaskRow
(http://msdn.microsoft.com/en-us/library/ms447939.aspx)

.. ProjectDataSet.TaskRow.AddPosition
(http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.addposition.aspx)

.. ProjectDataSet.TaskRow.AddAfterTaskUID
(http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.addaftertaskuid.aspx).



As for shifting the TASK_IDs, ProjectDataSet.TaskRow.TASK_ID is
read-only
(http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.task_id.aspx),
so unfortunately you cannot change it.



Also check out Creating a Task Hierarchy
(http://blogs.msdn.com/project_programmability/archive/2007/02/07/creating-a-task-hierarchy.aspx).



Hope that helps!



--

Stephen Sanderlin

Principal Consultant

MSProjectExperts



For Project Server Consulting: http://www.msprojectexperts.com

For Project Server Training: http://www.projectservertraining.com



Read my blog at: http://www.projectserverhelp.com/

Join the community at: http://forums.epmfaq.com
 
S

Stephan Steiner

Stephen

This definitely helps. The first link already defines how you define the position where a task is being added.. AddPosition and AddAfterTaskUID look like what I'm looking for - that solution seems more trustworthy than using TASK_IDs like in PDS.

Thanks for your help.
Stephan
"Stephen Sanderlin" <stephen NS-DOT sanderlin A-NS-T msprojectexperts DOT-NS com> wrote in message I've never tried to do this, but I would recommend that you review the following documentation in the SDK:

· ProjectDataSet.TaskDataTable.AddTaskRow (http://msdn.microsoft.com/en-us/library/ms447939.aspx)

· ProjectDataSet.TaskRow.AddPosition (http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.addposition.aspx)

· ProjectDataSet.TaskRow.AddAfterTaskUID (http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.addaftertaskuid.aspx).



As for shifting the TASK_IDs, ProjectDataSet.TaskRow.TASK_ID is read-only (http://msdn.microsoft.com/en-us/library/websvcproject.projectdataset.taskrow.task_id.aspx), so unfortunately you cannot change it.



Also check out Creating a Task Hierarchy (http://blogs.msdn.com/project_programmability/archive/2007/02/07/creating-a-task-hierarchy.aspx).



Hope that helps!



--

Stephen Sanderlin

Principal Consultant

MSProjectExperts



For Project Server Consulting: http://www.msprojectexperts.com

For Project Server Training: http://www.projectservertraining.com



Read my blog at: http://www.projectserverhelp.com/

Join the community at: http://forums.epmfaq.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top