Clarity

  • 1.  Portlet input paramater

    Posted Aug 29, 2011 06:20 AM
    Is it possible to have a portlet that uses an input parameter as the current user id?

    For example:


    Select * from
    inv_investments
    where manager_id = @WHERE:PARAM:XML:INTEGER:/data/current_user_id/@value@

    What is the correct syntax for this?


  • 2.  RE: Portlet input paramater
    Best Answer

    Posted Aug 29, 2011 09:09 AM
    There are a few "built-in" parameters that let you pick up the executing user's ID / LANGUAGE / etc

    From the studio manual;
    Built-in parameters, which automatically take their values at run-time based on the current user settings or system context. Built-in parameters are specified using the following syntax:
    @SELECT:PARAM:PARAM_IDENTIFIER[:ALIAS]@

    or,

    @WHERE:PARAM:PARAM_IDENTIFIER@

    Where:
    PARAM_IDENTIFIER is one of the following:

    USER_ID
    USER_NAME
    LANGUAGE
    LOCALE


    So you want @WHERE:PARAM:USER_ID@


  • 3.  RE: Portlet input paramater

    Posted Aug 30, 2011 08:15 AM
    Thanks Dave:

    where resource_id = @WHERE:PARAM:USER_ID@


  • 4.  RE: Portlet input paramater

    Posted Aug 30, 2011 12:15 PM
    Thanks Dave:

    where resource_id = @WHERE:PARAM:USER_ID@