AnsweredAssumed Answered

Depend lookup in filter section of portlet.

Question asked by Majlos on Apr 2, 2010
Latest reply on Apr 3, 2010 by Majlos
Hello


I have portlet based on project on the Dashboard tab. I have separate object, which is a subobject of the object project. In this subobject I created some monitoring reports.   Then I create the lookup, which selet the monitoring reports based on the current project.

And what I need is, I would like to put this lookup as a filter in the portlet. Now the filter select every monitoring reports wrom every project and I need, that the filter select just tho monitoring reports from the current project.


Lookup works fine as a standalone atribute, because it is mapped to the project id, but I do not know, how can I restrict this lookup in the filter section on the portlet.

Please do you have any recommandation, how can I do this?

best regards

Milos



Portlet

SELECT @select:dim:user_def:implied:hlaseni:cast(hlaseni.inv_id as varchar(50))+hlaseni.ppmas_id:project_uid@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.inv_id:project_it_id@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.mh_parent:mh_parent_filter@, "this filter is mapped to the Lookup, which is depend on the project"
@select:dim_prop:user_def:implied:hlaseni:hlaseni.name:project_name@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.pmas:majetek_sluzby@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.ppmas:podklady@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.PREDMET_VYUCTOVANI:predmet_vyuctovani@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.CELKOVA_CASTKABEZDPH:celkova_castkabezdph@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.ZPUSOBILE_VZDAJEBEZDPH:zpusobile_vydajebezdph@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.INVESTICNI_VYDAJBEZDPH:investicni_vydajebezdph@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.DATUM_SPLATNOSTI:datum_splatnosti@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.DRUH_DOKLADU:druh_dokladu@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.CISLO_UCETNIHO_DOKLADU:CISLO_UCETNIHO_DOKLADU@,
@select:dim_prop:user_def:implied:hlaseni:hlaseni.CISLO_SMLOUVY:CISLO_SMLOUVY@,
@select:metric:user_def:implied:NVL(hlaseni.CELKOVA_CASTKABEZDPH,0):Celkova_CASTKA@
from
(select distinct
i.id inv_id,
i.name,
ppmas.odf_parent_id ppmas_id,
pmas.name PMAS,
ppmas.name PPMAS,
mh.odf_parent_id mh_parent,
ppmas.mz1_ud_predmet PREDMET_VYUCTOVANI,
ppmas.mz1_ud_ccbd CELKOVA_CASTKABEZDPH,
ppmas.mz1_ud_zvbd ZPUSOBILE_VZDAJEBEZDPH,
ppmas.mz1_ud_ivbd INVESTICNI_VYDAJBEZDPH,
to_char (ppmas.mz1_ud_dtmsplatnosti, 'DD.MM.YYYY') DATUM_SPLATNOSTI,
case when ppmas.mz1_ppmas_typp2=5001821 then 'Faktura'
else 'Faktura'
end DRUH_DOKLADU,
pmas.MZ1_PMAS_CISLOZAK CISLO_UCETNIHO_DOKLADU,
pmas.MZ1_PMAS_CISLOZAK CISLO_SMLOUVY
from
inv_investments i join
odf_ca_mz1_pmas pmas on i.id=pmas.odf_parent_id join
odf_ca_mz1_ppmas ppmas on pmas.id=ppmas.odf_parent_id join
odf_ca_mz1_mh_emz mh on ppmas.md_podklady_mh=mh.id
where ppmas.mz1_ppmas_typp2=5001821
and ( (i.id = @WHERE:PARAM:XML:INTEGER:/data/id/@value@ AND @WHERE:PARAM:XML:INTEGER:/data/id/@value@ IS NOT NULL) OR (@WHERE:PARAM:XML:INTEGER:/data/id/@value@ IS NULL ) )
) hlaseni
where @filter@



Lookup

select @SELECT:m.id:id@,
                @SELECT:m.odf_parent_id:mon_id@,            
                @SELECT:m.name:name@
from
odf_ca_mz1_mh_emz m
WHERE @FILTER@
@BROWSE-ONLY:
  AND ((m.odf_parent_id = @where:param:USER_DEF:integer:project_int_id@)
            OR (@where:param:USER_DEF:integer:project_int_id@ is null))
:BROWSE-ONLY@

Outcomes