Clarity

  • 1.  Query To Return Resource "Primary Role"

    Posted Nov 01, 2013 09:55 AM
      |   view attached

    Hello,

    I'm looking for some help in identifying / joining some tables.   I need a basic query that returns a Resources name, and their Primary Role.  Both fields are displayed in the attached screenshot.   I have located the Resource Name in the SRM_RESOURCES table, but I can't find where the Primary Role is stored, or how to join it to my Resource table.

    Thanks in advance!

     



  • 2.  RE: Query To Return Resource "Primary Role"

    Posted Nov 01, 2013 10:11 AM

    For "historical" reasons the Clarity data-model in the resource/user area is split over a number of tables.

    The relationship to "primary role" is held in the PRJ_RESOURCES.prprimaryroleid column* (and that value is a join back to the 'role' which is just another type of resource -i.e. the prprimaryroleid value will be the srm_resources.id of the role record).

    (* - the relationship between SRM_RESOURCES and PRJ_PRESOURCES is a 1 to 1 relationship on id = prid)

    --

    The technical reference guide documents contain ERD pictures - one of which is "Resources" and this shows you all the relationships.

    LINK TO RESOURCES ERD

     



  • 3.  RE: Query To Return Resource "Primary Role"

    Posted Nov 01, 2013 10:14 AM

    Table Name = PRJ_RESOURCES

    Column = prPrimaryRoleID

    Data Type = Lookup - Number

    I hope you can start now ... smiley

    NJ



  • 4.  RE: Query To Return Resource "Primary Role"

    Posted Nov 01, 2013 10:16 AM

    Too slow NJ!  laugh
     



  • 5.  RE: Query To Return Resource "Primary Role"

    Posted Nov 01, 2013 10:30 AM

    sad Agree ... U were quicker and are the quickest wink

    NJ