Dynamic Links with a default value do not properly display
search cancel

Dynamic Links with a default value do not properly display

book

Article ID: 409739

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Dynamic Links are not properly displayed when this contains a default value

STEPS TO REPRODUCE:

  1. Create a custom object with investment extension: z_my_object
  2. Create a lookup with the following query:
    •    SELECT  @SELECT:inv.id:prj_id@,
         @SELECT:inv.code:prj_code@,
         @SELECT:inv.name:prj_name@
         FROM   inv_investments inv
         WHERE   @FILTER@
         AND inv.odf_object_code='project'
         @BROWSE-ONLY: AND inv.is_active=1 :BROWSE-ONLY@
         
  3. Create a lookup attribute (z_prj_code) attached to the same
  4. Create a lookup with the following query:
    •    SELECT 
         @SELECT:1:TEST@
         ,@SELECT:X.link_details:link_details@
         FROM
         (
         SELECT ' <a href="/pm/#/project/'||z_prj_code||'/details"> <font color="Blue"><i><u>'||z_prj_code||'</u></i></font></a> '  LINK_DETAILS
         FROM
         odf_ca_z_my_object rp
         WHERE rp.z_prj_code=@WHERE:PARAM:USER_DEF:INTEGER:object_Prj_id@  
         ) X
         WHERE @FILTER@
         
  5. Create a lookup attribute (my_link) and z_prj_code as a lookup parameter mapping
  6. In MUX, go to Investments > My Object > Add both fields to the Grid, Details panel and Blueprint Properties 
  7. Create an instance and populate the z_prj_code and the my_link fields
  8. The link shows the project ID selected and you get redirected to the project as expected
  9. Create a lookup with the following query:
    •    SELECT 
         @SELECT:1:TEST@
         ,@SELECT:X.link_details:link_details@
         FROM
         (
         SELECT ' <a href="/pm/#/project/'||z_prj_code||'/details"> <font color="Blue"><i><u>'||z_prj_code||'</u></i></font></a> '  LINK_DETAILS
         FROM
         odf_ca_z_my_object rp
         WHERE rp.z_prj_code=@WHERE:PARAM:USER_DEF:INTEGER:object_Prj_id@
         UNION
          SELECT ' <a href="/pm/#/projects/common"> <font color="Blue"><i><u>Projects</u></i></font></a> '  LINK_DETAILS
         FROM DUAL
         WHERE @WHERE:PARAM:USER_DEF:INTEGER:object_Prj_id@ IS NULL 
         ) X
         WHERE @FILTER@
  10. Create a lookup attribute (my_link2) and z_prj_code as a lookup parameter mapping
  11. Add the column to the Grid, Details panel and Blueprint Properties 
  12. Create an instance of the object and do not populate the z_prj_code field.
  13. Populate the my_link2 field. 
  14. The default /pm/#/projects/common link is selected
  15. Populate the z_prj_code field.
  16. Repopulate the my_link2 field. The selected value points to the specific project selected

Expected Results: The hyperlink displays the specific project selected and redirects to the same
Actual Results: The hyperlink displays the generic projects/common URL instead 

Environment

Clarity 16.3.1, 16.3.2, 16.3.3

Cause

This is caused by DE175569

Resolution

This is happening due to the performance improvement done for parameterized lookups implemented. If you want to exclude this lookup from the optimization and to make it work as expected, you can do it by running below command.

admin system-options -add LOOKUP_CACHE_OPTION <LOOKUP CODE> -multi