Clarity

Expand all | Collapse all

Query Portlet - How do I convert string to a URL hyperlink?

  • 1.  Query Portlet - How do I convert string to a URL hyperlink?

    Posted Mar 24, 2009 06:49 AM
    We have a Query portlet to show project information. This portlet also shows "project website" but it shows as a string and not a hyperlink. I have tried adding href and xmllink commands but did not work. Any advise would be appreciated.Thanks


  • 2.  Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted Mar 28, 2009 12:34 PM
    Hi, that's exactly the same question I asked a year ago with the subject "Create external linking (URL) in Query based grid portlet".Unfortunately this still seems not possible.  Maybe you can log a RFI case with CA Clarity Support and post the answer here? Regards,Karmen


  • 3.  Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted May 19, 2009 01:17 PM
    What if your project URL attribute was a URL of type instead of a string. It should work then.


  • 4.  Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted May 19, 2009 11:49 PM
    ^ I think that that only works satisfactorily when you are in the object screens rather than in a bespoke portlet....  i.e. if you have a URL type attribute agains the project object then when you are in the Project Edit screen it will launch when you click on it; BUT if you have a portlet displaying that field, it only gets displayed as "text".  I worked around this by linking the "text" in a portlet to drill down to the (eg) project object where the URL is actually held, and then you can click on that. But this is still 2-clicks rather than 1 and it is a bit unclean from a user perspective (they might be more inclind just to cut/paste the URL into a browser).   This was all in 7.5.3 so maybe the portlet functionality has been improved since then to provide a URL-"display type" - it can't be too hard can it? (but maybe not!)  Dave.  


  • 5.  Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted May 21, 2009 01:14 PM
    Does the link have a string of "://" in it?   I found that when using a relative link in a URL attribute, it would be a clickable link in list views, but not on a properties page.   I added "://" as a parameter at the end of the link (e.g. "app?action=npt.overview&://") and that made it clickable.


  • 6.  RE: Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted May 19, 2011 07:38 AM
    Hi

    SELECT right_subquery.ID, right_subquery.user_name,
    right_subquery.resource_name, right_subquery.unique_name,
    right_subquery.date_of_hire, right_subquery.date_of_termination,
    NVL (right_subquery.no_of_groups, 0) AS no_of_groups,
    NVL (right_subquery.instance_right, 0) AS instance_right,
    nvl(right_subquery.obs_rights,0) as obs_rights,
    NVL (right_subquery.global_rights, 0) AS global_rights,
    'http://<URL>/niku/app?action=nmc.openUser&id='||right_subquery.userid||'&resourceId='||right_subquery.id '://' as userlink
    FROM (SELECT sec_users.ID AS userid, sec_users.user_name, srmres.ID,

    Is it supposed to be done the way it is done in the above example ? It's throwing error.

    Any input on this ?

    Thanks & Regards
    NJ


  • 7.  RE: Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted May 23, 2011 03:11 AM
    Hi

    SELECT right_subquery.ID, right_subquery.user_name,
    right_subquery.resource_name, right_subquery.unique_name,
    right_subquery.date_of_hire, right_subquery.date_of_termination,
    NVL (right_subquery.no_of_groups, 0) AS no_of_groups,
    NVL (right_subquery.instance_right, 0) AS instance_right,
    nvl(right_subquery.obs_rights,0) as obs_rights,
    NVL (right_subquery.global_rights, 0) AS global_rights,
    'http://<URL>/niku/app?action=nmc.openUser&id='||right_subquery.userid||'&resourceId='||right_subquery.id '://' as userlink
    FROM (SELECT sec_users.ID AS userid, sec_users.user_name, srmres.ID,

    Is it supposed to be done the way it is done in the above example ? It's throwing error.

    Any input on this ?

    Thanks & Regards
    NJ


  • 8.  RE: Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted May 24, 2011 05:38 PM
    These don't give errors and seem to work on MS SQL (on my VM, therefore the localhost)

    SELECT @SELECT:DIM:USER_DEF:IMPLIED:R:R.ID:RID@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:R:R.RES:RESOURCE@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:R:(R.PART1):URL@
    FROM (select
    (last_name+first_name) RES,
    ID,
    cast(id AS char) IID,
    '2283643 part1
    SRM_RESOURCES) R
    WHERE @FILTER@



    SELECT @SELECT:DIM:USER_DEF:IMPLIED:R:R.ID:RID@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:R:R.RES:RESOURCE@,
    @SELECT:DIM_PROP:USER_DEF:IMPLIED:R:(R.PART1+R.IID):URL@
    FROM (select
    (last_name+first_name) RES,
    ID,
    cast(id AS char) IID,
    'http://localhost/niku/app?action=projmgr.editResource&id=' part1
    from
    SRM_RESOURCES) R
    WHERE @FILTER@

    P.S:
    That is in v12.1 SP1 and Ff 4.0.1
    Martti K.


  • 9.  Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted Oct 15, 2015 10:54 AM

    Hi NJ,

     

    I have portlet in which I need to show URL of different project subpages (subobject) links, so I setup the URL as shown above.

    select

    a.id,

    a.name,

    a.URL

    from inv_investments c

    Union

    Select b.id

    b.name,

    b.URL

    from inv_investments b

     

    The URL's of my query is different for each part which I want to shown in common column but the URL is big so its increasing column size.

    Is there a way we can represent the URL present in query with some image or with some hyperlink abbreviation ? (The option of Link Parameter in Query is suitable for only 1 type of link for all rows, but here the links are different for rows)

     

    I would appreciate the help.

     

    Br,

    Sandeep



  • 10.  Re: Query Portlet - How do I convert string to a URL hyperlink?

    Posted Oct 15, 2015 11:10 AM

    This should help -

     

    Shortening the Long URL attribute

    https://communities.ca.com/message/241796511#241796511

     

     

    NJ