none
reading custom fields using psi RRS feed

  • Question

  • Hello:

    I am trying to retrieve this  MSP_EpmCPTaskVar0.CFVal11 using the PSI call. This custom field is created for task.   I am already using the custom field web service.  But I am not sure where to go from here.  I would like to use the psi call.  Looking at the psi call, I am not sure how to just retrieve only custom field value 11. 

    Thanks for your assistance.

    kkmick

     

    Tuesday, July 27, 2010 8:09 PM

Answers

  • The PSI does not read the Reporting database, which is where MSP_EpmCPTaskVar0.CFVal11 is located. Actually, if you just query the MSP_EpmTask_UserView in the RDB, you can easily find the custom field value for a particular task name or GUID. The user views do all the work of complicated JOINs of the RDB tables.

    Otherwise, you'd have to use the Project service in the PSI, e.g. use ReadProjectEntities, find the task in the ProjectDataSet.TaskCustomFields table, find the associated CustomFieldUid and the value -- or CodeValue (if the custom field uses a lookup table) and only then use the CustomFields service (and maybe the LookupTables service) to find the actual value. Lots of work.

    --Jim

    Tuesday, July 27, 2010 10:38 PM

All replies

  • The PSI does not read the Reporting database, which is where MSP_EpmCPTaskVar0.CFVal11 is located. Actually, if you just query the MSP_EpmTask_UserView in the RDB, you can easily find the custom field value for a particular task name or GUID. The user views do all the work of complicated JOINs of the RDB tables.

    Otherwise, you'd have to use the Project service in the PSI, e.g. use ReadProjectEntities, find the task in the ProjectDataSet.TaskCustomFields table, find the associated CustomFieldUid and the value -- or CodeValue (if the custom field uses a lookup table) and only then use the CustomFields service (and maybe the LookupTables service) to find the actual value. Lots of work.

    --Jim

    Tuesday, July 27, 2010 10:38 PM
  • Jim:

    I did find the view that I have to use.  But I have a question for you.  When is it a good idea to use the views , or when is it a good idea to use psi.  Actually, I found most of the common information that I need within the view. What is the best practice to use psi or the views that are already built in project server. 

    Thanks,

    kkmick

    Wednesday, July 28, 2010 12:20 PM
  • Jim can u give a sample code for above. I got to do the same, for Project- I have tasks, for each tasks I need to find only if task custom field matches my criteria show those task and task custom field...please its urgent any help appreciated,

     

    I am reading list projects

    reading my projects

    My tasks

    inside this need to check if task has custom field A= "B" value (B comes from my criteria) then show the Task + custom field A

    Arati

     

    Friday, January 7, 2011 6:01 PM