Clarity PPM

Expand all | Collapse all

Trying to add a portlet to Actions using the Internal ID for the Resource

  • 1.  Trying to add a portlet to Actions using the Internal ID for the Resource

    Posted 07-15-2015 08:47 AM

    I'm trying to provide an easy popup check for resource managers and other managers within CA PPM.

     

    We're on 13.3 and I've constructed a query, portlet, page that returns the user's security groups that they belong in.

     

    SELECT GRP.ID GRP_ID, ADMIN_RES.ID RES_ID, NAME.GROUP_NAME GROUP_NAME

     

    FROM CMN_SEC_USER_GROUPS USERS

         INNER JOIN CMN_SEC_GROUPS GRP ON GRP.ID = USERS.GROUP_ID

         INNER JOIN CMN_SEC_USERS ADMIN_RES ON ADMIN_RES.ID = USERS.USER_ID

         INNER JOIN CMN_SEC_GROUPS_V NAME ON GRP.ID = NAME.ID

         INNER JOIN SRM_RESOURCES RES ON RES.USER_ID = ADMIN_RES.ID

     

    WHERE GRP.IS_ACTIVE = 1

         AND LANGUAGE_CODE= 'en'

         AND RES.ID = ?

     

    My issue is using the WHERE clause at the end to filter it automatically to populate with the results for the resource.

     

    For my example the URL is: /niku/nu#action:projmgr.editResource&id=5133018&odf_return_to=projmgr.getResources%26reload%3Dtrue

     

    So I should be able to use: @WHERE:PARAM:XML:STRING:/DATA/ID/@VALUE@ right?

     

    I know I can pass the value in the linking when I add the action item, but I'm not certain how do it.



  • 2.  Re: Trying to add a portlet to Actions using the Internal ID for the Resource

    Posted 07-20-2015 08:22 AM

    Have I stumped the group?



  • 3.  Re: Trying to add a portlet to Actions using the Internal ID for the Resource

    Posted 07-20-2015 09:56 AM

    Yes, you can use the @WHERE:PARAM:XML:STRING:/DATA/ID/@VALUE@ (perhaps needs lower case "id" though) construct in NSQL behind a portlet which is located upon a portlet page that includes the id=5133018 in the page's URL. (The portlet page itself needs to define the linking parameters to get the URL formatted correctly)

     

    From you original post, I'm not clear where you are trying to use it?  (your example URL is for an object page, not a portlet page )



  • 4.  Re: Trying to add a portlet to Actions using the Internal ID for the Resource

    Posted 07-20-2015 10:02 AM

    The URL Provided is the url from the window that currently pops up with the portlet page title, porlet title, from using the Action link from the Resource Object if that makes sense.

     

    Here's the Query for that Portlet on that page:

     

    SELECT
    @SELECT:DIM:USER_DEF:IMPLIED:SECURITY:(GRP_ID||RES_ID):UNIQUE_ID@
    ,@SELECT:DIM_PROP:USER_DEF:IMPLIED:SECURITY:GROUP_NAME:GROUP_NAME@

    FROM (
             SELECT GRP.ID GRP_ID, ADMIN_RES.ID RES_ID, NAME.GROUP_NAME GROUP_NAME

      FROM CMN_SEC_USER_GROUPS USERS
      INNER JOIN CMN_SEC_GROUPS GRP ON GRP.ID = USERS.GROUP_ID
      INNER JOIN CMN_SEC_USERS ADMIN_RES ON ADMIN_RES.ID = USERS.USER_ID
      INNER JOIN CMN_SEC_GROUPS_V NAME ON GRP.ID = NAME.ID
      INNER JOIN SRM_RESOURCES RES ON RES.USER_ID = ADMIN_RES.ID

      WHERE GRP.IS_ACTIVE = 1
      AND LANGUAGE_CODE= 'en'
      AND RES.ID = @where:param:xml:string:/data/id/@value@
    )

    WHERE @FILTER@

     

    Which returns a blank screen.



  • 5.  Re: Trying to add a portlet to Actions using the Internal ID for the Resource

    Posted 07-20-2015 10:21 AM

    ^ I'm not sure that it does! 

     

    Normally one would be linking to a portlet-page from (another) portlet



  • 6.  Re: Trying to add a portlet to Actions using the Internal ID for the Resource

    Posted 07-20-2015 12:15 PM

    ^ having said that, I could use the TIP : How To Put Any Dynamically Generated Value On A Clarity Object to construct a URL to build a link on an object page to a portlet-page with a URL of my choosing.

     

    I'm honestly not sure what you are doing with that "Action" though ; if you are getting a custom portlet-page to appear OK with that URL in it then I'm also not sure why the value from the URL isn't being picked up by the NSQL construct either. Sorry about that.