Building a simple change request app for #ProjectOnline using the #PowerPlatform #PowerApps and #PowerAutomate #LessCodeMorePower part 2

Following on from part 1 where we created the functional app for Project change requests, here is part 2. If you missed part 1 it can be found here: https://pwmather.wordpress.com/2020/02/09/building-a-simple-change-request-app-for-projectonline-using-the-powerplatform-powerapps-and-powerautomate-lesscodemorepower-part-1/.

In part 2 we will look at the Power Automate Flow for the approvals and task creation. The Flow used can be seen below:

Flow

If a change request is created in the Power App – this adds the data to the SharePoint list like below:

List1

From this point the Flow is used. The Flow firstly sends an approval request, in this example it is sent to myself but you could easily look up the approver to make it dynamic if the approver was linked to the project in some way. The approval request is sent via email – here is the example email I have generated using Flow Approvals:

Approval

If this is approved the Flow then checks out the project plan, adds a new task based on the change request data, checks in and publishes the project plan and finally updates the change request list item. Project task added:

Project

Change Request item updated:

List2

If the change request is rejected, the Flow just updates the list item:

List3

This is handled via a simple Power Automate Flow (same image used at the start of the post):

Flow1

Looking at the Flow details, the Flow is triggered using the SharePoint Online trigger – When an item is created, this is linked to the Change Request list. The next action is the approval with details from the SharePoint trigger passed in:

Flow Detail 1

Then there is a Condition action used to check the outcome of the approval action, this then branches to yes or no:

Flow Detail 2

If no, the Flow uses the Apply to each action as the Approval can return more than one result for multiple approvers etc. but in this case it will only be one but leave the apply to each action. Inside the apply to each loop there is a SharePoint Online action to Update item. This updates the change request with the approval rejection details:

Flow Details 4

If yes, the Flow uses the Project Online – Checkout project action to check out the project – the Project Id is passed in from the SharePoint trigger. Then the Project Online – Creates new task action is used to create the new task in the project using the details from the SharePoint trigger with the Checkin and publish project action to finish the project updates:

Flow Details 5

Then finally a SharePoint update item action is used to update the change request item with the approval details:

Flow Details 6

That’s it – a simple change request process built for Project Online using the Power Platform. A video of this app can be found here: https://youtu.be/Vm-YAc6q8PU

Comments are closed.

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: