TASK_UID mismatch in "TimesheetLine_Userview" versus PSI "SvcTimeSheet.TimesheetDataSet" RRS feed

  • Question

  • Hi,

    I'm facing an issue that I'm not fully understanding, maybe someone can help.

    When I query [MSP_TimesheetLine_UserView] for a specific timesheetUID, the TaskUID's I get dont always match the TASK_UID that I get when retrieving the same data using PSI.

    A few tasks match, a few don't.

    I'm loading the tasks into a DataTable (.net) from PSI using the following

    DataTable dtTASKS = new DataTable();


    but the "TASK_UID" from PSI and "TaskUID" from TimesheetLine_UserView *may mismatch.

    What plays a role in defining these UIDs? I was expecting them to be consistent. Does the view display a copy of the "real tasks" in some interim status?

    Any light or pointer would be great!

    thanks in advance


    Monday, October 10, 2016 9:40 AM

All replies

  • Hi,

    this is mainly the case, when a user created an assignment to an existing task in timesheet. The AssignmentUID will give you the chance to get correct TaskUID:

    SELECT        TSL.TimesheetLineUID
    			, ASS.TaskUID
    FROM            dbo.MSP_TimesheetLine AS TSL 
    INNER JOIN  dbo.MSP_EpmAssignment_UserView AS ASS 
    	ON TSL.AssignmentUID = ASS.AssignmentUID

    Does that help?

    To increase the value of this forum, please mark the replies that helped to solve your issue as answer. If you find answers to questions from other forum participants to be helpful, please mark them as helpful. Your participation will help others to find an appropriate solution faster. Thanks for your support!

    Monday, October 10, 2016 10:56 AM
  • Hi Barbara,

    thank for your reply. It does help, and I may refer to your suggestion in a couple of hours.

    I'm now going through TimesheetLineUID.

    See, I want to "write directly" into the Timesheet (through PSI) actuals table. Disregarding the assignments and the respective approval loop.

    I can bucketize the values per day and write them successfully. The missing link ware TASK_UID that were not always matching. Since I have TimesheetLineUID in both the TimesheetLine_UserView and both PSI timeSheetDs.Tables[1] I believe this is a working shortcut.

    this is WIP and I'll post back if it works as I expect.


    Monday, October 10, 2016 12:09 PM
  • Barbara (and others who may be interested)

    linking from TimesheeLine_UserView to PSI's timeSheetDs.Tables[1] using the TimesheetLineUID/TS_LINE_UID worked.

    What I'm doing is complex to describe in a short post - the background why I need this path - but for the sake of sharing this atomic concept: it works for my purpose.

    Thank you for your time and feedback.



    Monday, October 10, 2016 1:22 PM