Aug 08 2021 05:32 PM
In my MS Project file (Project Web App https://[tenant].sharepoint.com/sites/space/[Program Name]/) I can read the list of custom fields using PowerBI ODataFeed. The PowerBI (PowerQuery) code is below:
Source = ODataFeed("https://[tenant].sharepoint.com/sites/space/[Program Name]/Projects('[Project ID]')/Tasks('Task ID')/CustomFields", null, [Implementation="2.0"])
It returns table with the list of custom fields names, their properties and their AppAlternateIDs (whatever that means)
But I cannot find a way to read the values of those custom fields for the tasks. I have tried things like
Source = ODataFeed("https://[tenant].sharepoint.com/sites/space/[Program Name]/Projects('[Project ID]')/Tasks('Task ID')/CustomFields('AppAlternateID')", null, [Implementation="2.0"])
But that simply returns the relevant row from the table I get in the previous step (without using the 'AppAlternateID' in the URI)
I have been googling it and many people are scratching their heads for an answer.
Aug 09 2021 09:52 AM
Hello @Asim_H ,
For reporting, use the ProjectData API: https://[tenant].sharepoint.com/sites/space/[Program Name]/_api/ProjectData - you will see lots of tables / endpoints here.
Use the Projects table / endpoint to get Project level details: https://[tenant].sharepoint.com/sites/space/[Program Name]/_api/ProjectData/Projects
Use the Tasks table / endpoint to get Task level details: https://[tenant].sharepoint.com/sites/space/[Program Name]/_api/ProjectData/Tasks
Paul
Aug 09 2021 08:14 PM
Thanks @Paul Mather . I'm not sure what is the difference between the ProjectServer vs. ProjectData but I can't get the list of custom fields using the ProjectServer.
Anyway, I'm already using those end points that you mentioned. As noted in my original post, the issue is really with getting the values of custom fields linked to the Tasks (I..e added columns in the schedule). That's where some example or documentation of the ODATA for PWAs would be helpful.
Aug 09 2021 11:59 PM
Hello @Asim_H ,
/ProjectServer is the CRUD API whereas the /ProjectData API is the read / reporting API. Are you just reading data or wanting to update it?
Paul