Forum Discussion

Anil_kumar's avatar
Anil_kumar
Copper Contributor
Mar 05, 2022

How to Call custom fields using OData in Project online/Power automate?

for ex:
https://companyname.sharepoint.com/sites/pwa/_api/ProjectData/Projects()?$Select=ProjectName,ProjectOwnerName
if you type the above command in browser it will show list of all projects with some data.
I had created a custom filed: entity is project, type is text, custom filed name is 2024.When i am trying to call this filed using this syntax. I am getting this error
 
https://companyname.sharepoint.com/sites/pwa/_api/ProjectData/Projects()?$Select=ProjectName,2024
 
<m:code/>
<m:message xml:lang="en-US">An identifier was expected at position 12.</m:message>
</m:error>
 
How to get the 2024 custom filed data using that odata syntax?
  • Hello Anil_kumar ,

    Try {pwaUrl}/_api/ProjectData/Projects()?$select=ProjectName,_x0032_024 - the first number is encoded. If you are unsure of the properties to use in any endpoint, use the metadata endpoint the check {pwaUrl}/_api/ProjectData/$metadata

    Paul

  • Hello Anil_kumar ,

    Try {pwaUrl}/_api/ProjectData/Projects()?$select=ProjectName,_x0032_024 - the first number is encoded. If you are unsure of the properties to use in any endpoint, use the metadata endpoint the check {pwaUrl}/_api/ProjectData/$metadata

    Paul

Resources