#ProjectOnline #PPM #PowerBI Project Compliance Report Pack #BI #Reporting #PowerQuery #DAX #Office365

October 22, 2018 at 9:29 pm | Posted in Add-on, Administration, Functionality, Information, Reporting | 3 Comments
Tags: , , , , ,

This is a supporting blog post for a new Project Online Power BI Report Pack that I have published. This report pack provides examples for a project compliance / audit type check to ensure your projects follow certain planning standards. This follows on from the previous report packs that I published: https://pwmather.wordpress.com/2017/10/31/projectonline-ppm-powerbi-report-pack-v2-bi-reporting-powerquery-dax-office365/ This new report pack follows the same theme / styling. The compliance report pack can be downloaded from the Microsoft Gallery, the link to download the report is here: https://gallery.technet.microsoft.com/Online-Power-BI-Compliance-b45b657c

The report pack consists of two reports, a summary report for project level checks and a detailed report for tasks, risks and issues checks. These can be seen below:

Summary Page:

image

Project Details (Select a Project from the filter):

image

Same report but with a different project selected:

image

These reports only use default intrinsic fields so it should work for all Project Online deployments.

Once downloaded, the report pack data sources will need to be updated to point to your target Project Online PWA instance. To do this you will need the Power BI desktop tool installed. This can be downloaded here: https://powerbi.microsoft.com/en-us/desktop

Open the downloaded PWMatherProjectOnlinePowerBIAuditComplianceReportPack.pbit template file in Power BI Desktop and follow the steps below to point the data sources to your Project Online PWA instance:

  • In the parameter window that opens, enter the full Project Online PWA URL without the /default.asp – such as https://tenant.sharepoint.com/sites/pwa
  • Click Load
  • The data will now start to load and you will be prompted to connect
  • On the OData feed window, click Organizational account and click Sign in and enter credentials as required
  • Click Connect
  • On the Privacy levels window set the privacy as required
  • Click Save
  • The data will load – this may take a few minutes depending on the dataset size in Project Online
  • Access the Project Details page and select a project from the project filter
  • Save the report

Please note, some of the steps above might not be seen if you have connected to the Project Online instance from Power BI Desktop previously. This file can either be emailed around to colleagues with details on how to update the credentials to their own or what would be better is to create a Power BI app workspace and give users access: https://docs.microsoft.com/en-us/power-bi/service-create-workspaces

The checks in this pack are just examples and might not be applicable to your organisation but it will give you a good starting point it you do not have any compliance / assurance type reports today.

I will plan to update this in the future, so feel free to add comments for any suggested project compliance checks, provided they are generic enough and possible using only intrinsic fields, I will look to add these in a later release.

I hope you like it Smile

Advertisements

#ProjectOnline PWA Stats with Snapshot #JavaScript #jQuery #PPM #Office365 #PMOT #MSProject

July 2, 2018 at 10:55 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, Reporting | Comments Off on #ProjectOnline PWA Stats with Snapshot #JavaScript #jQuery #PPM #Office365 #PMOT #MSProject
Tags: , , , ,

Want to view simple PWA stats and capture the data to then build simple trend reports? This simple JavaScript and jQuery solution starter might be a good starting point. The output can be seen below:

image

Each PWA entity can be expanded to see the stats:

image

image

Then each week or month etc. you can take a snapshot of the data using the Snapshot button, this creates an item on the snapshot list:

image

The solution starter code has been published for download. The code expects the SharePoint list to already exist but that is covered in this blog post. The solution starter code can be downloaded from the Microsoft Gallery using the link here: https://gallery.technet.microsoft.com/Online-PWA-Stats-and-eb56e6bb

The code does make use of jQuery and jQuery UI, these are loaded from the jQuery CDN but you might want to download them and store them locally etc.:

image

The code expects a list called PWASnapshot in the root PWA site collection:

image

This can be updated to a different target list in the root PWA site collection, just change the listTitle variable as seen above. The following columns are required to already exist on the target SharePoint list in the PWA site collection:

image

They’re all default column settings apart from DateCaptured, this defaults to Today’s Date. If you do not need the snapshot capability, you could just comment out / remove the snapshot button from the code.

Create a new page on the PWA site to display the PWA Stats data, I created a new web part page in a library called “Pauls” in the root PWA site – this is on my test PWA site, hence a library called Pauls!

image

Download and update the solution starter as required – remember it is a solution starter so it could do with some code optimisations and better error handling etc. Upload the solution starter JavaScript code to the PWA site, in this example I uploaded it to the same library as the new PWAStats page. Edit the new page and add a Content Editor Web Part, update the Content Link to add the relative URL path for the JavaScript code as seen below in this example:

image

Update other web part settings as required then click Apply then click OK and stop editing the page.

As the data is loaded, the SharePoint modal dialog will appear:

image

This will close once all the projects are loaded as on my PWA dataset, the projects data is the largest.

Clicking the snapshot button will also load the SharePoint modal dialog:

image

This will close when the item is added to the list, then a message will display below the button to state the item has been added:

image

Trend reports could easily be created using Power BI consuming the snapshot list data to see how the data changes over time.

This could easily be extended to bring in additional PWA stats. I will probably write a blog post in the future to extend this to capture additional PWA stats.

The solution starter file contains HTML, CSS and JavaScript in the same file, for production you might want to split out the HTML, CSS and JavaScript into the separate files, reference the JavaScript and CSS files in the HTML file and link to the HTML file in the content editor web part but as this is so small having one file will be fine and is easier to manage.

Fully test on a DEV / TEST PWA instance first before using in Production. The script is provided "As is" with no warranties etc.

I hope you find it useful Smile

Getting Starting with #ProjectOnline and #PowerApps #PVC18 presentation links #PPM #PMOT #Apps #Office365 #MSProject

June 14, 2018 at 7:59 pm | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information, Mobile | 1 Comment
Tags: , , ,

Last week I had the pleasure of presenting at the awesome Project Virtual Conference 2018. During my session I referenced existing blog posts and code samples that I had previously published on my blog. As promised in the presentation, here is a blog post containing all of the relevant links to help get you started using PowerApps for Project Online. A link to my session is here: http://projectvirtualconference.com/sessions/getting-started-with-project-online-and-powerapps/

Firstly here is a link to the official PowerApps site: https://powerapps.microsoft.com/en-us/build-powerapps/

The first example app we looked at was a navigation PowerApp for Project Online, this made use of the SharePoint Online connector in PowerApps. As discussed, you would need a process to get the required Project Online data into the target SharePoint list for this approach. Here a link to an example solution starter PowerShell script that will do just that: https://pwmather.wordpress.com/2018/03/01/projectonline-powershell-to-keep-ppm-data-in-sync-on-sharepoint-list-pmot-o365/

Once the data is available, here are the two links that walkthrough creating this example navigation app:

Part 1: https://pwmather.wordpress.com/2018/02/21/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-part1/

Part 2: https://pwmather.wordpress.com/2018/02/24/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-sharepoint-part2/

The next example PowerApp we looked at in the presentation made use of the Project Online connector in PowerApps to give examples of using some of the actions available in the connector. This works directly with Project Online so does not require any background process to get data into SharePoint. As mentioned in the presentation, the properties available are fairly limited, hence for the navigation app I had to get the data from Project Online into SharePoint list first as I needed the Project Site URL which is not in the Project data set in the Project Online connector for PowerApps. This example app did make use of the Project Online connector in PowerApps: https://docs.microsoft.com/en-us/connectors/projectonline/

Here are the three links that walkthrough creating this example app:

Part 1: https://pwmather.wordpress.com/2018/03/14/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part1/

Part 2: https://pwmather.wordpress.com/2018/04/11/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part2/

Part 3: https://pwmather.wordpress.com/2018/04/26/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part3/

As mentioned in the presentation, you can create a PowerApp that make use of both the SharePoint connector and Project Online or any number of connectors available for PowerApps – there are lots!

PowerApps are a great way to build business applications without having to write any code!

#ProjectOnline : Add related projects to a custom field #JavaScript #jQuery #PPM #Office365 #PMOT #MSProject

May 24, 2018 at 7:24 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information | 1 Comment
Tags: , , ,

This blog post follows on from my earlier blog post on updating Project Online project level custom fields from JavaScript using the REST API: https://pwmather.wordpress.com/2018/05/21/using-rest-in-javascript-to-update-projectonline-project-custom-fields-ppm-pmot-jquery-office365/

As mentioned in that post, I have published example code sample / solution starter that demonstrates updating a project level custom field using the REST API. This simple code sample runs from a Project Detail Page in the Project Web App site collection, it enables the user to add related projects to a project level custom field. As mentioned, it is a solution start to demonstrate the use of the Project Online REST APIs from JavaScript, so it wouldn’t be fit for production use as it would need some tweaks to manage things like displaying projects already added to the custom field pre-loaded in the related project list etc. The solution starter functionality can be seen below:

image

The solution starter code can be downloaded from the Microsoft Gallery here: https://gallery.technet.microsoft.com/Online-Add-Related-e6a69a02

Once downloaded, open the file to edit in your chosen editor (notepad will do if you have nothing else, I use Visual Studio Code or Notepad++). To get the solution starter code to work, you will need to update the custom field internal name for your target project level custom field, the code sample also assumes this target custom field is a text field. If the target field is a different type you will need to update the value type as mentioned in the first post.

Firstly, get the correct internal name for the custom field as seen below in this example:

image

This information is available using the CustomField API: {PWAUrl}/_api/ProjectServer/CustomFields

Now in the solution starter code, update the projectCFInternalName variable on line 61 as seen below with the correct guid:

image

Save the file and upload to a library in the PWA Site, for example mine is uploaded to the Site Assets library. Then add a Content Editor Web Part to the target Project Detail Page in PWA, edit that new web part:

image

In the content link, put a link into the JavaScript file, in my example the link is /sites/pwa/SiteAssets/PWARelatedProject.js. Expand Appearance, give it a title and change the Chrome Type to None. Click Apply then click OK and stop editing the page. Your page will then display the following (assuming you edited the web part from PWA Settings > Project Details Pages:

image

When accessed from a PDP linked to a project the following will display:

image

The list of projects are filtered to the list of projects the current user can access. Use the buttons to add the related project/s:

image

Then click Save:

image

Once the publish job has been sent to the queue for processing the modal will close. Viewing the custom field in the PDP will show the the projects added:

image

This is just a simple example to demonstrate updating project level custom fields using the REST API from a Project Detail Page. Update the solution starter to ensure the code is production ready and fully test on a DEV / TEST PWA instance first before using in Production. The script is provided "As is" with no warranties etc.

Using #REST in #JavaScript to update #ProjectOnline project custom fields #PPM #PMOT #jQuery #Office365

May 21, 2018 at 12:01 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information | 1 Comment
Tags: , , ,

This blog post provides example code for updating Project Online project level custom fields using the REST API ({PWASite}/_api/ProjectServer) in JavaScript on a PWA page. Following this blog post later this week will be a full working code sample that will be available for download.

When updating a project programmatically you will still need to following the same steps you do when updating a project manually, check out, update, publish and check in. The code snippets below demonstrate these actions using the REST API in JavaScript for updating a project level custom field.

Firstly check out the project:

image

Here we are passing in the project GUID into the URL that we will call to check out the project using the jQuery ajax HTTP request. The check out method is detailed here: https://msdn.microsoft.com/en-us/office/project/api/publishedproject#CheckOut__ If successful we then call the updateProjectCF function:

image

Again, in here we are passing in the same project GUID into the URL to update the custom fields using the jQuery ajax HTTP request. This call is slightly more involved as we have to inform the API call what is being changed. This is done by passing that data to the API in the HTTP call. To update custom fields you have to specify the key, the value and value type. The key is the internal custom field name, an example seen below:

image

This information is available using the CustomField API: {PWAUrl}/_api/ProjectServer/CustomFields

The value is the data you want to add to the custom field, this example is just updating a free text (single line of text) field. The value type specifies the custom field data type that you are updating. These are all prefixed with Edm (Entity Data Model) then the the type such as String, Int32 or DataTime etc. The update custom field method is detailed here: https://msdn.microsoft.com/en-us/office/project/api/draftproject#UpdateCustomFields_Collection_SP.KeyValue__customFieldDictionary_ If successful we then call the publishcheckInProject function:

image

Similar to the first API call, we just pass in the same project GUID to the URL used then call to publish and check in the project using the jQuery ajax HTTP call. Specifying true with the publish call will check in the project. The publish method is detailed here: https://msdn.microsoft.com/en-us/office/project/api/draftproject#Publish_Boolean_checkIn_

As mentioned earlier on in the post, there will be a full working example / solution started published later this week.

#ProjectOnline #PowerApps using the Project Online Connector #PPM #Apps #MSProject #O365 Part3

April 26, 2018 at 10:01 pm | Posted in Add-on, Administration, Configuration, Functionality, Information | 1 Comment
Tags: , , , ,

In part three of this series of blog posts we will look at using the CreateProject action from the Project Online PowerApps Connector. For those of you that missed part 1, here is a link: https://pwmather.wordpress.com/2018/03/14/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part1/ and part 2: https://pwmather.wordpress.com/2018/04/11/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part2/

The CreateProject action is: ProjectOnline.CreateProject({“PWASiteURL”}, {“ProjectName”},{Optional parameters}). As you can see, there is the PWA Site as one required parameter and the Project Name as the other. There are also optional parameters for description and start date as documented here. In this post we will add a new page to our example PowerApp to provide inputs to the parameters for the CreateProject action. Add a new blank screen to the PowerApp, in this example I called the new page NewProject:

image

Next I added a label to the page to add “Create a new project:” then two text input boxes, one for the Project Name and one for the Project Description. The two text input box properties were updated to remove the default text and add hint text as seen below for the Project Name input box:

image

Next a date picker was added to select the project start date along with two buttons, one to create the project and one to cancel / navigate back to the homepage. The button text was updated as required and the back button OnSelect property updated to navigate to the Projects page:

image

The create button action for OnSelect would be ProjectOnline.CreateProject(“PWAURL”, TextInput1.Text,{Description: TextInput2.Text, Start: DatePicker1.SelectedDate}) as seen below:

SNAGHTML1164f9e

Update the control references such as TextInput1 as required. That is the minimum needed to create a new project but really there should be checks to ensure the name is set as that is a required parameter and also do things like clear the inputs once the project is created / navigate back the homepage automatically. Below is a simple example to ensure the project name input is not blank. Firstly add a new label with the text “Project Name is empty” then add a X icon:

image

Now select both of those elements from the left menu and group them together:

image

Now set the group visible property to Off:

image

Select the X icon and update the OnSelect action to UpdateContext({alert:false}):

image

Select the grouping then select the Visible property and change the value from false to alert:

image

Now click the Create button as the OnSelect action needs to be updated to If(IsBlank(TextInput1.Text),UpdateContext({alert:true}),ProjectOnline.CreateProject(“PWAURL”, TextInput1.Text,{Description: TextInput2.Text, Start: DatePicker1.SelectedDate})) as seen below:

SNAGHTML12b8166

Update the control references such as TextInput1 as required. Now if the Project Name input, in my example TextInput1, is empty the alert will be displayed with the X to close the alert:

image

The final part of this app is to add a button / icon from the home screen to be able to create a new project by navigating to the NewProject screen:

image

That’s it for now but hopefully enough to get you started with the Project Online Connector for PowerApps, there are more actions available for this connector and so much more you can do with PowerApps! Look out for more Project Online related PowerApps blog posts in the future.

#ProjectOnline #PowerApps using the Project Online Connector #PPM #Apps #MSProject #O365 Part2

April 11, 2018 at 12:20 pm | Posted in Add-on, Administration, App, Configuration, Customisation | 2 Comments
Tags: , , , ,

In part two of this series of blog posts we will look at using the ListTasks action from the Project Online PowerApps Connector. For those of you that missed part 1, here is a link: https://pwmather.wordpress.com/2018/03/14/projectonline-powerapps-using-the-project-online-connector-ppm-apps-msproject-o365-part1/

The ListTasks action is: ProjectOnline.ListTasks("{ProjectGUID}","{"PWASiteURL}).value

As you can see we need to pass in two parameters here, the Project GUID and the PWA Site URL. As this requires the Project GUID, we will use the PowerApp we started with in part 1 and pass in the Project GUID from the first screen. Add another screen to your PowerApp, in this example I have just added a blank screen and renamed it to Tasks:

image

Now add a data table to this new screen:

image

With the new data table selected, click the Advanced option in the right pane:

image

Now on the advanced settings pane, in DATA > Items enter:

ProjectOnline.ListTasks(Gallery2.Selected.Id,https://tenant.sharepoint.com/sites/pwa).value

Update the query as required, for example update to the correct gallery name and update to the correct PWA URL.

SNAGHTML2fcefca

Click “Choose the fields you want to add from the customization pane”, in this example I have selected Name and PercentComplete:

SNAGHTML2fefd2e

Now I will add a label at the top of the screen to display the Project Name. With the label added to the screen, select the label and click the advanced setting pane:

image

In DATA > Text starting typing the name of your gallery added to the first screen, select it then type “.” then click selected then “.” then click Name:

image

Now the project name for the first project in the gallery will display:

image

You could look to include an option here to add new tasks if you wanted, the action to use would be: https://docs.microsoft.com/en-us/connectors/projectonline/#creates-new-task

Now we need to add in a control to be able to navigate back to the projects screen, I have just added a left arrow icon then updated the OnSelect property in the advanced settings pane to navigate to the projects screen:

image

Now on the Projects screen we need to update the next icon on the gallery to navigate to the Tasks screen, select the icon and update the OnSelect property on the advanced pane:

image

Now you have an app that will display a list of all projects directly from Project Online, then access the tasks from that selected project.

Next up we will look at create new projects in Project Online using the CreateProject action.

#ProjectOnline #PowerApps using the Project Online Connector #PPM #Apps #MSProject #O365 Part1

March 14, 2018 at 10:39 pm | Posted in Add-on, Administration, App, Configuration, Customisation | 2 Comments
Tags: , , , ,

I recently published two articles on creating a navigation type app for Project Online using PowerApps, here is a screen shot of the project details screen from that example app:

SNAGHTML28370a07

For those of you that missed those posts, the links are below:

https://pwmather.wordpress.com/2018/02/21/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-part1/

https://pwmather.wordpress.com/2018/02/24/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-sharepoint-part2/

That particular example used a SharePoint list as the data source as there were certain properties I needed such as the Project Site URL that are not available in the native Project Online connector for PowerApps. I also stored project images in that source SharePoint list and displayed those in my example app. I used a custom process to populate the SharePoint list with the Project Online data and kept that data in sync. In this series of blog posts we will look at how to use the native Project Online PowerApps connector: https://docs.microsoft.com/en-us/connectors/projectonline/.

This connector allows us to perform certain actions in PowerApps such as read the list of Projects directly from the PWA site collection: https://docs.microsoft.com/en-us/connectors/projectonline/#List_projects or creating a new project: https://docs.microsoft.com/en-us/connectors/projectonline/#Creates_new_project for example.

This series of blog posts wont build a full PowerApp using this connector but it will show snippets on how to use some of the Project Online PowerApps connector functions.

The first one we will look at is displaying a list of projects in PowerApps using the list projects function.

This series of posts assume that you have set up a Project Online Connection to Project Online:

SNAGHTML6a9d36

If you haven’t set up a Project Online connection yet, it is very simple, just click the + New Connection link and find Project Online then add.

Using the PowerApps studio, either desktop or web, we will start with a blank app:

SNAGHTML6d726e

The first thing to do is to add the Project Online data source, click “connect to data”. This will load all of your connections you have added to PowerApps / Flow, select the Project Online connection:

SNAGHTML6edae8

Then close the Data window. Now decide on the visual that you need to display the projects, I inserted a gallery:

image

Then set the layout to just Title as I only will just display the project name for the purpose of this blog post:

image

Click Advanced on the Gallery settings pane and you will notice it states “CustomGallerySample” in the DATA > Items field. Update this to:

ProjectOnline.ListProjects("{PWASiteURL}").value

SNAGHTML7a47c5

Now you can select a property to display on the gallery, in this example I will select Name:

SNAGHTML7d85ba

Now all of your projects will appear in the gallery directly from Project Online:

SNAGHTML9f2a46

In the next post we will look at how to use the ListTasks function in the Project Online PowerApps connector.

#ProjectOnline / #ProjectServer display Project Detail Page web parts using tabs #PPM #MSProject #JavaScript #jQuery

March 4, 2018 at 4:40 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information | Comments Off on #ProjectOnline / #ProjectServer display Project Detail Page web parts using tabs #PPM #MSProject #JavaScript #jQuery
Tags: , , , , ,

Got lots of web parts on a Project Detail Page in Project Online? Lots of fields that you want to group or display in a better way without navigating between pages? If so, this might be your answer, a simple JavaScript and jQuery solution to add tabs to your Project Detail Pages as seen below:

image

image

The solution starter code has been published for download but it will need updating to work on your PWA configuration but it is very simple and this blog post covers the changes needed. The download will just save a lot of typing and includes the full source code. The solution starter code can be downloaded from the Microsoft Gallery using the link here: https://gallery.technet.microsoft.com/Online-Server-PDP-tabs-c8012555 

Once downloaded, open the file to edit in your chosen editor (notepad will do if you have nothing else, I use Visual Studio Code or Notepad++). This solution starter is set to work with two web parts, the web parts seen below in my Project Online DEV instance.

image

In this post we will walkthrough adding in a 3rd web part to the script as that will provide the steps needed to get the correct web part references to update the script:

image

Firstly we need the web part div ID, to do this, when on the Project Detail Page in PWA press F12 and this will load the browser dev tools:

image

Using the element selector:

image

Select the web part, one at a time like below and click:

image

The DOM Explorer will then update and show you the web part div. You need to copy the div id as outlined in red below:

image

Repeat this for all the web parts on that page with you wish to move to use tabs then the browser dev tools can be closed.

In this example I just need to update the JavaScript file to add another item to the HTML list, add another div, move the web part to my new div, update the functions and add another function for my new list item. These changes can all be found in the screen shots below. The before images are the base script as downloaded. Before:

image

After:

image

Now I need to update the JavaScript in the file. Before:

image

After:

image

Save the file and upload to a library in the PWA Site, for example mine is uploaded to the Shared Documents library. Then add a Content Editor Web Part to the target Project Detail Page in PWA at the top of the page and edit that new web part:

image

In the content link, put a link into the JavaScript file, expand Appearance, give it a title and change the Chrome Type to None. Click Apply then click OK and stop editing the page. Your page will then display the web parts on the tabs:

image

Simple! This can easily be extended to add icons to the tabs etc. This simple example uses jQuery UI tabs: http://jqueryui.com/tabs/ that provides may options. In this example I also use the base jQuery UI theme CSS file but there are a few to choose from: https://code.jquery.com/ui/ I load the jQuery files in from the jQuery CDN but you might want to download them and store them locally etc. Also, the solution starter file contains HTML and JavaScript, for production you might want to split out the HTML and JavaScript into the separate files, reference the JavaScript file in the HTML file and link to the HTML file in the content editor web part but as this is so small having one file will be fine and is easier!

Fully test on a DEV / TEST PWA instance first before using in Production. The script is provided "As is" with no warranties etc.

Enjoy Smile

#ProjectOnline #PowerShell to keep #PPM data in sync on #SharePoint list #PMOT #O365

March 1, 2018 at 1:38 pm | Posted in Add-on, Administration, App, Configuration, Customisation, Functionality, Information | 1 Comment
Tags: , , , , ,

Following on from my two PowerApps posts on creating an example Project Online PowerApps app, I thought I would publish the example PowerShell script that I used to populate and update my SharePoint list in the Project Web App site collection. For those that missed my Project Online PowerApps posts, please find the links below:

https://pwmather.wordpress.com/2018/02/21/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-part1/

https://pwmather.wordpress.com/2018/02/24/projectonline-powerapps-example-office365-ppm-pmot-apps-msproject-sharepoint-part2/

The script sample can be downloaded from the Microsoft Script Gallery here: https://gallery.technet.microsoft.com/Keep-Online-data-in-sync-06a1bf8d

This PowerShell script will use the Project Reporting OData API to get all of the published projects in the Project Online PWA Site Collection, then for each project it will then create or update a list item on the specified SharePoint list. If the project has already been created on the SharePoint list on a previous run, the items will be updated rather than creating a new item.The user setting up the script will need to make some changes to the script, this is covered in the blog post.

The account used will need access to the OData API in PWA and contribute access to the target SharePoint list. The SharePoint list will also need to be created beforehand with the required columns.

To get the script to work you will need to reference the DLL as seen in the image below:

image

This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.

Firstly decide what project level fields you want to include in your PowerApp / SharePoint list, this will determine the list column requirements. Then create the SharePoint list in the PWA site collection with the required columns, for this example I created a list called ProjectData with the columns below:

image

Title is used for my Project Names in this example. You will then need to update the list item update / creation part of the sample script to map to the correct SharePoint column names you created and the project fields:

image

Also ensure the variables have been updated correctly, placeholder values seen below:

image

Save and run the PowerShell script (fully test on a non-production PWA site collection before Production) to ensure the data is captured correctly in the target SharePoint list. This script could be run manually on demand or on schedule using a scheduled task if running on a server or a scheduled Azure Function or other methods. This script could also be updated to work based on the project publish event using a combination of Flow / Logic App and an Azure Function based on previous examples I have blogged: https://pwmather.wordpress.com/2017/08/01/running-projectonline-powershell-in-azure-using-azurefunctions-ppm-cloud-flow-logicapp-part2/

Whilst the purpose of this script was to enable us to get the data into a SharePoint list and keep the data in sync for our PowerApp, it can be used for other purposes. For example, you could use this example script to modified the last script I published for HTLM fields to update existing items rather than creating new items each run. Do keep in mind that this SharePoint list would not be security trimmed like a Project Center view though, so you might want to restrict access to the SharePoint list depending on your data / security policies for your PPM data.

The script is provided "As is" with no warranties etc.

Next Page »

Create a free website or blog at WordPress.com.
Entries and comments feeds.