lookupPickerField Filter values on lookup option


I’m using Cuba Platform v 7.2.6.

I do have many Lookup Picker Fields in my application that needs to be filtered based on various user actions.

I do apply the filter in the look as below.

         <collection id="locationsDc" class="com.g10.align.entity.Location">
            <loader id="locationsDl">
                    <![CDATA[select e from align_Location e where e.entity = :container_entitiesDc]]>

<lookupPickerField id="locationField" property="location"
                                <action id="picker_lookup" type="picker_lookup"/>
                                <action id="picker_clear" type="picker_clear"/>
                                <action id="picker_open" type="picker_open"/>

It does work well in the Lookup Picker Field. However when user clicks on the Lookup action button of the picker filed, when it opens the browser screen in the lookup mode, it shows all the records in spite of the filter applied in container of the picker field.

How do I apply filter the lookup screen as well?


Hi @harikrishnadhas.k1,

First, use Query Conditions in your lookup/browse screen to prepare it to receive additional parameters from other screens.

Then, intercept your lookup action and set the required Screen Parameters.

Take a look at Using Screen Parameters in Loaders as well, it may help.


Hi @peterson.br,

Thanks for your answer. This looks good work around. I have done Query Conditions and Screen Parameters already, Now i need to figure out how to intercept the Lookup Action.

I would like to check if platform provides any option itself.


Hi @harikrishnadhas.k1,

Yes, there are many ways. Take a look at LookupAction in the docs for some examples.