Assignment assignment to resource

Assignment assignment to resource

Post by UEc » Tue, 28 Mar 2006 07:56:45


There is code to add new assignments in the documentation. What we want to do
is make sure every non-summary task has a resource. I think i understand that
if i look up assignments with the negative flag, that this assignment is not
assigned. Can i simply change the value and update the values similar to
adding? In other words, reused the assignment that was previously the
"holding" assignment that had no resource?


To create a new assignment in the database, you must add a new row to the
MSP_ASSIGNMENTS table with values for at least the following columns:

Table Fields Notes
MSP_ASSIGNMENTS PROJ_ID Refers to a valid ID in the MSP_PROJECTS table.
ASSN_UID The unique ID for the assignment.
TASK_UID Refers to a valid ID in the MSP_TASKS table.
RES_UID Refers to a valid ID in the MSP_RESOURCES table.
ASSN_UNITS The percentage number of units for which a resource is assigned
to a task, expressed as a percentage of 100 percent (%), assuming a
resource's MaxUnits value is 100 percent.
ASSN_WORK The total amount of work scheduled to be performed by a resource
on a task; defaults to 0 if not specified.
EXT_EDIT_REF_DATA Must be set to 1 to indicate that this assignment is a
new assignment.
MSP_PROJECTS PROJ_EXT_EDITED Must be set to 1 for Project to process.

To create an assignment, copy, modify and execute the following insert
statement.

Insert into MSP_ASSIGNMENTS (
PROJ_ID,
ASSN_UID,
RES_UID,
TASK_UID,
ASSN_UNITS,
ASSN_WORK,
EXT_EDIT_REF_DATA )
values (
3,
11,
6,
14,
100
480000, -- eight hours of work
'1' )

To create a new assignment in the database for an existing unassigned task,
you must delete the placeholder assignment from the MSP_ASSIGNMENTS table
that references the TASK_UID of the task. To delete a placeholder assignment,
copy, modify and execute the following delete statement.

Delete from MSP_ASSIGNMENTS
Where TASK_UID = 17
And RES_UID = -65535 -- unassigned resource ID