Skip to content
 

Copying Resource Assignments through the Power Automate Bound Action

Copying tasks and assignments from an already existing plan within project for the web to a new project

Organisations often possess multiple project templates, each containing a schedule with tasks and the assignment of over 100 resources. Manually assigning these resources whenever a new project is created is inefficient especially when a Power Automate bound action called “msdyn_CopyProjectv4” exists.

The Power Automate bound action facilitates the copying of a project schedule/task pane, including resource assignments, into new projects. The key steps involved in this solution are:

  1. Understanding the Bound Action:
  • The Bound action for the solution requires the following fields: Table name, Action Name, row ID (target project ID), team member option, Source Project (lookup), Teamember Items (not used for this solution), and TeamMemberMapping (Key and Value mapping of source project’s team member ID (The Key) and the destination project’s team member ID (The Value)).
Copying Resource Assignments through the Power Automate Bound Action image
  • The team member option determines whether to copy team members and resources:

0 – Don’t copy team members.

1 – Copy team members as generic resources.

2 – Copy team members to specified named or generic resources.

For this solution, we will be using: 2 – Copy team members to specified named or generic resources.

Implementation Steps

To retrieve the values required by the fields, we will follow the steps outlined below:

1. Get the Unique ID of the Source Project:

In the example, the name of the Source Project is stored in a column called plan template in the destination project’s record.

Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image

2. Get Resource Assignments:

Retrieve resource assignments from the source project template. The action below gets the resources assigned in the specified source project (the project ID).

Copying Resource Assignments through the Power Automate Bound Action image

3. Get the Unique ID of the Bookable Resource Category:

Here, we’re using “Team Member”.

Copying Resource Assignments through the Power Automate Bound Action image

4. Create an Array:

Create an array containing the project team ID and the bookable resource ID from the listed resource assignments.

Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image

5. Create New Team Members:

Use the retrieved resource IDs to create new team members in the destination project. This involves multiple steps:

      • To apply to each using the array of bookable resource IDs, create a GUID.
      • Using the unbound action msdyn_CreateTeamMembersV1, add all the resource IDs to the team of the new target project.
      • Append to a new array both the bookable resource ID and their team member ID associated with the new target project.
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image

6. Mapping IDs:

Map the team member IDs from the source project to the new project. Parse both the original project’s ResourceID/TeamID combinations and the new project’s ResourceID/TeamID combinations in parse JSON actions.

Iterate through both projects’ ResourceIDs and where the resource IDs match, append the team IDs to an array, with the KEY being the source project members’ team member IDs and the VALUE being the destination project’s team member IDs.

Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image

7. Execute Bound Action:

Run the msdyn_CopyProject action with the appropriate parameters and mappings. The Row ID contains the unique ID of the Destination Project.

Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image
Copying Resource Assignments through the Power Automate Bound Action image

8. Remove Duplicates:

Finally, use the Union expression to remove any duplicates from the new mapping of team member IDs.

Copying Resource Assignments through the Power Automate Bound Action image

Practical Application:

Resource assignments and tasks can be copied from an existing project to a new destination project through the mapping of team member IDs. This automation, when successfully implemented, can significantly reduce the time and effort required to set up new projects with pre-assigned tasks and resources. It ensures consistency and accuracy in resource assignments, enhancing overall project management efficiency.