[jira] [Commented] (OFBIZ-5350) Lookup fields do not apply query filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-5350) Lookup fields do not apply query filter

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804670#comment-13804670 ]

Christian Carlow commented on OFBIZ-5350:
-----------------------------------------

Hey Jacques,

I've discovered that the functionality provided by my patch actually already implemented although in a different way.  

I wanted to apply a filter to the dropdown results of a LookupField and wasn't aware how to do it at the time.  Now I've determined that the functionality is being used OOTB for the product lookup field of the Purchase Order form to limit drop down results to products only associated with the supplier.  The LookupSupplierProduct screen uses the "andCondition" field to apply the filter to the dropdown results.

The main difference with my script is that parameters only have to be specified in the lookupFormField url in order to be applied to as filters.  Without it, the "andCondition" field must be set to an EntityCondition created for the parameter that was passed in by URL.

I think the existing functionality is better than the patch that I created because it allows for more control over how conditions should be applied.  My code would create and EQUALS condition for all parameters where as "andCondition" field allows for some of those parameters to be applied as LIKE or other types of conditions.

I think this issue can be closed.

> Lookup fields do not apply query filter
> ---------------------------------------
>
>                 Key: OFBIZ-5350
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5350
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS
>    Affects Versions: Release Branch 12.04
>            Reporter: Christian Carlow
>         Attachments: FindAutocompleteOptions.groovy.patch, FindAutocompleteOptions.groovy.patch
>
>
> Lookup field fieldFormName queryString values are not applied to the query results used by the "drop down list" functionality of the control.
> Associated Nabble forums:
> http://ofbiz.135035.n4.nabble.com/Filter-on-lookup-filed-td4640658.html
> http://ofbiz.135035.n4.nabble.com/filter-on-ajax-auto-complete-lookup-td4169426.html



--
This message was sent by Atlassian JIRA
(v6.1#6144)