1

Scenario: a user has an .mpp project file they work with locally. They set up a local custom text field to use a lookup table. They then upload and save that file to a Project Server / PWA instance, and publish it.

Is there a way to access the lookup table for that field using the /_api/ProjectServer/ REST endpoint?

I know already that I can see the values of local custom fields by getting tasks from

/_api/ProjectServer/Projects('project-id')/Tasks

and the local custom fields show up with internal names like

LocalCustom_x005f_Published_x005f_7c0ccd0ceb0aea1182667c7635fa5766_x005f_000039b78bbe4ceb82c4fa8c0b40003b

however, the value of a local custom text field that has been set up to use a lookup table is not a string of the display value of that lookup entry, it's an array with the internal name of the lookup table entry, so something like

["Entry_10fb560fc5c0e711a8f0e4a7a071ef48"]

So, clearly, if I can get a hold of the lookup table entries, I can find the entry by its internal name and get the display value. However, if I try to get the lookup tables from

/_api/ProjectServer/LookupTables

I only get the Enterprise lookup tables.

So is there a way to get the lookup table associated with a local custom field in a project that has been uploaded to Project Server?

1

As answered over on the MS TechNet Project Server Forum, you can get the lookup table of a local custom field by using the URL

https://<<PWA URL>>/_api/ProjectServer/Projects('<<ProjectID>>')/CustomFields('LocalCustom_Draft_f233fada2a0cea119bdad4258bf6958b_000039b78bbe4ceb82c4fa8c0b400033')/LookupTable/Entries

which, I discovered through playing around in Postman, can be shortened to use just the custom field's GUID without the LocalCustom prefix with the project ID, like:

https://<<PWA URL>>/_api/ProjectServer/Projects('<<ProjectID>>')/CustomFields('000039b78bbe4ceb82c4fa8c0b400033')/LookupTable/Entries

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.