cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PaulD1
Community Champion
Community Champion

Project Online connector: get resource names for a task

Hi

 

I'm using the Project Online connector and the Lists tasks step. I want to pull the same data as is displayed in the Task view of Project Online (e.g. Task Name, Duration, Start, Finish, Duration, % Complete and Resource Names).

 

Under Dynamic content I can find all these except for Duration and Resource Names.

 

By pasting the JSON returned by the List tasks step into a JSON viewer (http://jsonviewer.stack.hu/) I can see that Duration is returned and I can grab it simply by referencing

item()['Duration']

Question 1: Why don't all available/applicable options (such as Duration) show in Dynamic content? Is this a bug?

 

Even when I look at the returned JSON, I cannot find Resource Names. This is appears to be a complex field allowing multiple entries and referencing a resources table in Project Online. Searching in the JSON for names of resources I know are assigned to the tasks yields nothing and there is no property with 'resource' in the name.

 

Question 2: How do I get the Rource Names assigned to a Project?

 

Question 3: Where/how can I get information on what data I can pull from Project Online (and other connections)? Dynamic content is not reliable and even viewing/searching the underlying JSON doesn't always help, as with the example of Resource Names. Is there a central repository documenting the various connectors that is hidden beyond my googling/binging abilities?

 

Thanks!

Paul

12 REPLIES 12
v-yuazh-msft
Community Support
Community Support

Hi @PaulD1,

 

Could you please share a screenshot of the configuration of your flow?

Could you please explain more details about the JSON viewer?

 

Please share more details so we would try to provide a proper workaround for you.

 

Best regards,

Alice

 

PaulD1
Community Champion
Community Champion

image.png

 

Here you can see that 'Duration' is not listed in the Dynamic content list, however, it can be added by manually entering the expression item()['Duration'] after which it even appears with the proper Project logo.

 

Why does this not appear in Dynamic content?

I'm finding missing entries in Dynamic content a lot. I have to run a test in Flow, copy the JSON Output (generally by adding a compose step where the input is the output from a step such as List Tasks) then paste that into one of the JSON viewers available online to check what is really available, or copy to a text editor and do a search for field names or data that I think should be included.

 

Hope this makes clearer the issue I'm trying to highlight.

 

Thanks

Paul

 

 

 

Hi @PaulD1,

 

As you said, the 'Duration' is not listed in the Dynamic content list ,and it can be added by manually entering the expression item()['Duration'] after which it even appears with the proper Project logo.

 

The 'Duration' is not listed in the Dynamic content list because the 'Duration' value is come from the array "Returned project" in the From field of "Select" action, the 'Duration' value is been saved in an item in the "Returned project",however, the "Select" action couldn't analysis the columns in the array "Returned project" just when the "Returned project" dynamic content is insert in the from field.

 

And if the manually enter the expression item()['Duration'] in the action, when the flow runs, the flow would analysis the columns in the "Returned project",and the expression item()['Duration'] in the action would be recognized as a column in the array "Returned project".

 

Best regards,

Alice

PaulD1
Community Champion
Community Champion

Thanks Alice

 

I guess what I am trying to understand is, why is the Dynamic Content so unreliable? Other fields from the Returned Project array appear - what is the difference between Duration and those other fields that are populated in Dynamic Content? Is this acknowledged as a bug and is it being worked on?

 

I'm really impressed by the capabilities of Flow and the integration between services that it allows, but we can't be experts on every service available and so should be able to rely on the interface to correctly expose the available data/capabilities. As a relative newbie to flow I find it very inconvenient to have to 'play detective' to investigate all the fields returned rather than just those that show up in Dynamic Content.

 

Thanks

Paul

Hi,

Were you able to retrieve the Resource Name value? I am not able to retrieve it as well.

Thanks

Hi @DebajyotiGuha 

 

No - I haven't found a way to get the resource name yet, concentrating on other requirements and hoping Resource Names won't be required or will be available when/if we need them!

Also looking for a solution - really disappointing that there is no support on this...

Anonymous
Not applicable

I am also looking for to retrieve the Resource ID but no way. Looked around the google for hours but no help at all. 

Anonymous
Not applicable

anyone figure this out yet? Still stuck in August 2020...

FastTrack
Kudo Collector
Kudo Collector

Hi,

 

got stuck there some months ago and gave up.

 

I know that Enterprise resources are linked to a task via  a resource ID and that a resource field of a task contains an array of these IDs.

The Resource table should be available via SharePoint http request pointing to the proper XML string, something like this I guessed

https://xyz.sharepoint.com/sites/pwa/_api/ProjectServer/EnterpriseResources('0edc75d1-f670-e911-afd7-983b8f0779fb')/Assignments 

 

Best you try the API in Internet Explorer or another XML viewer :

https://xyz.sharepoint.com/sites/pwa/_api/ProjectServer/..

 

To understand the table structure have a look here:

https://techcommunity.microsoft.com/t5/project/project-odata-api/m-p/218694

https://docs.microsoft.com/en-us/previous-versions/office/project-odata/jj163529(v%3doffice.15)

 

For me it got way too complicated, so If you find a solution I bow for you!

 

 

 

Anonymous
Not applicable

@FastTrack 

 

Thanks to your response I have been playing around in Power Automate and I finally figured out a way to Extract the "Resource Name" from Task level. I will post the details later tonight or tomorrow morning! Thanks again for your response and leading me to the right path.

Anonymous
Not applicable

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,413)