Clarity

 View Only
  • 1.  Filter OBS Multivalue

    Posted Jul 30, 2020 02:11 PM
    Hi Community, 

    In this case I contact to the Clarity community because I need to learn how apply a OBS filter in a portlet that allow to the users select multiple values. I see in the Project portlet (OOTB) that is posible, but in a portlet that I added this filter the users only can select only one option.
    The Query that include the portlet is this:

    LEFT JOIN ( select i.id, units.name, nbio.path from inv_investments i inner join prj_obs_associations obsa on obsa.record_id = i.id and obsa.table_name = 'SRM_PROJECTS' inner join prj_obs_units units on units.id = obsa.unit_id inner join prj_obs_types typ on units.type_id = typ.id left join nbi_dim_obs nbio on obsa.unit_id = nbio.obs_unit_id where typ.unique_name = 'obs_ejecucion') obse on obse.id = inv.id
    ....
    where 1=1AND   (@NVL@(@WHERE:PARAM:USER_DEF:INTEGER:obs@,0) = 0 OR    inv.id IN (SELECT obsa.record_id    FROM   prj_obs_associations obsa    INNER  JOIN prj_obs_units_flat obsf ON obsa.unit_id = obsf.unit_id    WHERE  (obsa.table_name LIKE 'INV%' OR obsa.table_name = 'SRM_PROJECTS')    AND    obsf.branch_unit_id = @WHERE:PARAM:USER_DEF:INTEGER:obs@) )


    Filter in my portlet:


    Filter in Project Portlet


    If anyone resolved this, please let me know.
    Best regards.
    Patricio.


  • 2.  RE: Filter OBS Multivalue
    Best Answer

    Posted Jul 31, 2020 03:33 AM
    Hi Patricio

    In your query, you need to indicate that the parameter is a numeric type and needs to come from a lookup:

    In the corresponding portlet filter field, you can then indicate that this is a multi-select filter:



  • 3.  RE: Filter OBS Multivalue

    Posted Aug 10, 2020 01:57 AM
    Hello Patricio,

    were You able to solve this ? I currently have a very similar issue, and even if I manage to make the filter field multi-select, it does not return any results...

    Let me know !

    Best regards,
    Tomas