Clarity PPM

Expand all | Collapse all

Masking URL in portlet

  • 1.  Masking URL in portlet

    Posted 02-20-2019 04:18 PM

    Hi ,

     

    I have written a NSQL query . I have an attribute which displays the URL value. I want to mask the url and provide just a link to redirect to the page. I have tried html tags in the NSQL. But it is not helping out 

     

    http://org/pm/#/timesheets/timesheet?'
    ||'resourceId='
    ||r.id
    ||''
    || chr(38)
    ||'timeperiodId='
    ||tp.prid
    ||''
    || chr(38)
    ||'timesheetId='
    ||ts.prid

     

    Below is the NSQL query

     

    SELECT @SELECT:DIM:USER_DEF:IMPLIED:TIMESHEETS:a.resource_int_id @+@ a.timeperiod_int_id @+@ @NVL@(a.timesheet_int_id,0):dim_id@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.timeperiod_int_id:timeperiod_int_id@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.timesheet_int_id:timesheet_int_id@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.resource_int_id:resource_int_id@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.resource_id:resource_id@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.period_start_date:time_period_start@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.period_end_date:time_period_end@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.timesheet_status_name:timesheet_status@,

    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:a.url:url@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:TIMESHEETS:'<a href="'||URL||'" target="_blank">Link to TEMPLATE</a>':link1@

    FROM (SELECT ts.prid timesheet_int_id,
    r.id resource_int_id,
    r.unique_name resource_id,
    r.full_name resource_name,
    tp.prid timeperiod_int_id,
    tp.prstart period_start_date,
    tp.prfinish - 1 period_end_date,
    ts.prstatus timesheet_status,
    st.name timesheet_status_name,
    @NVL@(tent.hours,0) hours,'http://test/pm/#/timesheets/timesheet?'
    ||'resourceId='
    ||r.id
    ||''
    || chr(38)
    ||'timeperiodId='
    ||tp.prid
    ||''
    || chr(38)
    ||'timesheetId='
    ||ts.prid
    AS url

    FROM prtimesheet ts
    INNER JOIN prtimeperiod tp ON ts.prtimeperiodid = tp.prid
    INNER JOIN srm_resources r ON ts.prresourceid = r.id
    LEFT OUTER JOIN
    (select te.prtimesheetid,sum(te.practsum/3600) hours
    from prtimeentry te
    group by te.prtimesheetid
    ) TENT ON TENT.PRTIMESHEETID = TS.PRID
    LEFT OUTER JOIN cmn_lookups_v st ON ts.prstatus = st.lookup_enum
    AND st.language_code = @WHERE:PARAM:LANGUAGE@
    AND st.lookup_type = 'TIMESHEET_STATUS'
    WHERE r.resource_type = 0
    AND r.user_id = @WHERE:PARAM:USER_ID@
    AND r.is_active = 1
    AND tp.prisopen = 1
    AND ts.prstatus < 5

    ) a
    WHERE @FILTER@



  • 2.  Re: Masking URL in portlet



  • 3.  Re: Masking URL in portlet

    Posted 02-21-2019 04:08 AM

    ^ that technique works only for object-edit pages, for NSQL based portlets then the 'URL redirection' technique is what is needed;

     

    URL Redirect to a Clarity Page 



  • 4.  Re: Masking URL in portlet

    Posted 02-21-2019 05:28 AM

    Hi Dave,

     

    The redirection should be to the new UX link.



  • 5.  Re: Masking URL in portlet

    Posted 02-21-2019 06:07 AM

    That URL redirection is a technique to redirect to any URL.



  • 6.  Re: Masking URL in portlet

    Posted 02-21-2019 06:12 AM

    Dave, is it possible to pass parameters in that??



  • 7.  Re: Masking URL in portlet

    Posted 02-21-2019 06:57 AM

    If your target URL can accept parameters then of course, its "just" a URL - i.e. "any URL" 



  • 8.  Re: Masking URL in portlet

    Posted 02-21-2019 06:32 AM

    OK, sorry about misleading info.